€•½¿Œsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ+/translations/zh_CN/core-api/pin_user_pages”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/zh_TW/core-api/pin_user_pages”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/it_IT/core-api/pin_user_pages”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/ja_JP/core-api/pin_user_pages”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/ko_KR/core-api/pin_user_pages”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/pt_BR/core-api/pin_user_pages”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/sp_SP/core-api/pin_user_pages”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)�”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…”�”}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒE/var/lib/git/docbuild/linux/Documentation/core-api/pin_user_pages.rst”h´KubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒ"pin_user_pages() and related calls”h]”hŒ"pin_user_pages() and related calls”…”�”}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒtopic”“”)�”}”(hhh]”hŒ bullet_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hhh]”hŒ paragraph”“”)�”}”(hhh]”hŒ reference”“”)�”}”(hhh]”hŒOverview”…”�”}”(hhóh²hh³Nh´Nubah}”(h]”Œid1”ah ]”h"]”h$]”h&]”Œrefid”Œoverview”uh1hñhhîubah}”(h]”h ]”h"]”h$]”h&]”uh1hìhhéubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhhäubhè)�”}”(hhh]”hí)�”}”(hhh]”hò)�”}”(hhh]”hŒBasic description of FOLL_PIN”…”�”}”(hjh²hh³Nh´Nubah}”(h]”Œid2”ah ]”h"]”h$]”h&]”Œrefid”Œbasic-description-of-foll-pin”uh1hñhjubah}”(h]”h ]”h"]”h$]”h&]”uh1hìhjubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhhäubhè)�”}”(hhh]”hí)�”}”(hhh]”hò)�”}”(hhh]”hŒ#Which flags are set by each wrapper”…”�”}”(hj7h²hh³Nh´Nubah}”(h]”Œid3”ah ]”h"]”h$]”h&]”Œrefid”Œ#which-flags-are-set-by-each-wrapper”uh1hñhj4ubah}”(h]”h ]”h"]”h$]”h&]”uh1hìhj1ubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhhäubhè)�”}”(hhh]”hí)�”}”(hhh]”hò)�”}”(hhh]”hŒTracking dma-pinned pages”…”�”}”(hjYh²hh³Nh´Nubah}”(h]”Œid4”ah ]”h"]”h$]”h&]”Œrefid”Œtracking-dma-pinned-pages”uh1hñhjVubah}”(h]”h ]”h"]”h$]”h&]”uh1hìhjSubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhhäubhè)�”}”(hhh]”(hí)�”}”(hhh]”hò)�”}”(hhh]”hŒ:FOLL_PIN, FOLL_GET, FOLL_LONGTERM: when to use which flags”…”�”}”(hj{h²hh³Nh´Nubah}”(h]”Œid5”ah ]”h"]”h$]”h&]”Œrefid”Œ7foll-pin-foll-get-foll-longterm-when-to-use-which-flags”uh1hñhjxubah}”(h]”h ]”h"]”h$]”h&]”uh1hìhjuubhã)�”}”(hhh]”(hè)�”}”(hhh]”hí)�”}”(hhh]”hò)�”}”(hhh]”hŒCASE 1: Direct IO (DIO)”…”�”}”(hjšh²hh³Nh´Nubah}”(h]”Œid6”ah ]”h"]”h$]”h&]”Œrefid”Œcase-1-direct-io-dio”uh1hñhj—ubah}”(h]”h ]”h"]”h$]”h&]”uh1hìhj”ubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhj‘ubhè)�”}”(hhh]”hí)�”}”(hhh]”hò)�”}”(hhh]”hŒ CASE 2: RDMA”…”�”}”(hj¼h²hh³Nh´Nubah}”(h]”Œid7”ah ]”h"]”h$]”h&]”Œrefid”Œ case-2-rdma”uh1hñhj¹ubah}”(h]”h ]”h"]”h$]”h&]”uh1hìhj¶ubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhj‘ubhè)�”}”(hhh]”hí)�”}”(hhh]”hò)�”}”(hhh]”hŒICASE 3: MMU notifier registration, with or without page faulting hardware”…”�”}”(hjÞh²hh³Nh´Nubah}”(h]”Œid8”ah ]”h"]”h$]”h&]”Œrefid”ŒGcase-3-mmu-notifier-registration-with-or-without-page-faulting-hardware”uh1hñhjÛubah}”(h]”h ]”h"]”h$]”h&]”uh1hìhjØubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhj‘ubhè)�”}”(hhh]”hí)�”}”(hhh]”hò)�”}”(hhh]”hŒ1CASE 4: Pinning for struct page manipulation only”…”�”}”(hjh²hh³Nh´Nubah}”(h]”Œid9”ah ]”h"]”h$]”h&]”Œrefid”Œ0case-4-pinning-for-struct-page-manipulation-only”uh1hñhjýubah}”(h]”h ]”h"]”h$]”h&]”uh1hìhjúubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhj‘ubhè)�”}”(hhh]”hí)�”}”(hhh]”hò)�”}”(hhh]”hŒ=CASE 5: Pinning in order to write to the data within the page”…”�”}”(hj"h²hh³Nh´Nubah}”(h]”Œid10”ah ]”h"]”h$]”h&]”Œrefid”Œpin_user_pages() pin_user_pages_fast() pin_user_pages_remote()”h]”hŒ>pin_user_pages() pin_user_pages_fast() pin_user_pages_remote()”…”�”}”hj&sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j$h³hÇh´Khjh²hubeh}”(h]”jah ]”h"]”Œoverview”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒBasic description of FOLL_PIN”h]”hŒBasic description of FOLL_PIN”…”�”}”(hj>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”jjuh1hÍhj;h²hh³hÇh´Kubhí)�”}”(hŒ×FOLL_PIN and FOLL_LONGTERM are flags that can be passed to the get_user_pages*() ("gup") family of functions. FOLL_PIN has significant interactions and interdependencies with FOLL_LONGTERM, so both are covered here.”h]”hŒÛFOLL_PIN and FOLL_LONGTERM are flags that can be passed to the get_user_pages*() (“gupâ€�) family of functions. FOLL_PIN has significant interactions and interdependencies with FOLL_LONGTERM, so both are covered here.”…”�”}”(hjLh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´Khj;h²hubhí)�”}”(hŒôFOLL_PIN is internal to gup, meaning that it should not appear at the gup call sites. This allows the associated wrapper functions (pin_user_pages*() and others) to set the correct combination of these flags, and to check for problems as well.”h]”hŒôFOLL_PIN is internal to gup, meaning that it should not appear at the gup call sites. This allows the associated wrapper functions (pin_user_pages*() and others) to set the correct combination of these flags, and to check for problems as well.”…”�”}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´Khj;h²hubhí)�”}”(hXEFOLL_LONGTERM, on the other hand, *is* allowed to be set at the gup call sites. This is in order to avoid creating a large number of wrapper functions to cover all combinations of get*(), pin*(), FOLL_LONGTERM, and more. Also, the pin_user_pages*() APIs are clearly distinct from the get_user_pages*() APIs, so that's a natural dividing line, and a good point to make separate wrapper calls. In other words, use pin_user_pages*() for DMA-pinned pages, and get_user_pages*() for other cases. There are five cases described later on in this document, to further clarify that concept.”h]”(hŒ"FOLL_LONGTERM, on the other hand, ”…”�”}”(hjhh²hh³Nh´NubhŒemphasis”“”)�”}”(hŒ*is*”h]”hŒis”…”�”}”(hjrh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphjhubhX! allowed to be set at the gup call sites. This is in order to avoid creating a large number of wrapper functions to cover all combinations of get*(), pin*(), FOLL_LONGTERM, and more. Also, the pin_user_pages*() APIs are clearly distinct from the get_user_pages*() APIs, so that’s a natural dividing line, and a good point to make separate wrapper calls. In other words, use pin_user_pages*() for DMA-pinned pages, and get_user_pages*() for other cases. There are five cases described later on in this document, to further clarify that concept.”…”�”}”(hjhh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´Khj;h²hubhí)�”}”(hX FOLL_PIN and FOLL_GET are mutually exclusive for a given gup call. However, multiple threads and call sites are free to pin the same struct pages, via both FOLL_PIN and FOLL_GET. It's just the call site that needs to choose one or the other, not the struct page(s).”h]”hX FOLL_PIN and FOLL_GET are mutually exclusive for a given gup call. However, multiple threads and call sites are free to pin the same struct pages, via both FOLL_PIN and FOLL_GET. It’s just the call site that needs to choose one or the other, not the struct page(s).”…”�”}”(hjŠh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´K'hj;h²hubhí)�”}”(hŒThe FOLL_PIN implementation is nearly the same as FOLL_GET, except that FOLL_PIN uses a different reference counting technique.”h]”hŒThe FOLL_PIN implementation is nearly the same as FOLL_GET, except that FOLL_PIN uses a different reference counting technique.”…”�”}”(hj˜h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´K,hj;h²hubhí)�”}”(hŒ�FOLL_PIN is a prerequisite to FOLL_LONGTERM. Another way of saying that is, FOLL_LONGTERM is a specific case, more restrictive case of FOLL_PIN.”h]”hŒ�FOLL_PIN is a prerequisite to FOLL_LONGTERM. Another way of saying that is, FOLL_LONGTERM is a specific case, more restrictive case of FOLL_PIN.”…”�”}”(hj¦h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´K/hj;h²hubeh}”(h]”j$ah ]”h"]”Œbasic description of foll_pin”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ#Which flags are set by each wrapper”h]”hŒ#Which flags are set by each wrapper”…”�”}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”jj@uh1hÍhj»h²hh³hÇh´K3ubhí)�”}”(hX For these pin_user_pages*() functions, FOLL_PIN is OR'd in with whatever gup flags the caller provides. The caller is required to pass in a non-null struct pages* array, and the function then pins pages by incrementing each by a special value: GUP_PIN_COUNTING_BIAS.”h]”hX For these pin_user_pages*() functions, FOLL_PIN is OR’d in with whatever gup flags the caller provides. The caller is required to pass in a non-null struct pages* array, and the function then pins pages by incrementing each by a special value: GUP_PIN_COUNTING_BIAS.”…”�”}”(hjÌh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´K5hj»h²hubhí)�”}”(hŒžFor large folios, the GUP_PIN_COUNTING_BIAS scheme is not used. Instead, the extra space available in the struct folio is used to store the pincount directly.”h]”hŒžFor large folios, the GUP_PIN_COUNTING_BIAS scheme is not used. Instead, the extra space available in the struct folio is used to store the pincount directly.”…”�”}”(hjÚh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´K:hj»h²hubhí)�”}”(hXcThis approach for large folios avoids the counting upper limit problems that are discussed below. Those limitations would have been aggravated severely by huge pages, because each tail page adds a refcount to the head page. And in fact, testing revealed that, without a separate pincount field, refcount overflows were seen in some huge page stress tests.”h]”hXcThis approach for large folios avoids the counting upper limit problems that are discussed below. Those limitations would have been aggravated severely by huge pages, because each tail page adds a refcount to the head page. And in fact, testing revealed that, without a separate pincount field, refcount overflows were seen in some huge page stress tests.”…”�”}”(hjèh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´K>hj»h²hubhí)�”}”(hŒzThis also means that huge pages and large folios do not suffer from the false positives problem that is mentioned below.::”h]”hŒyThis also means that huge pages and large folios do not suffer from the false positives problem that is mentioned below.:”…”�”}”(hjöh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´KDhj»h²hubj%)�”}”(hŒõFunction -------- pin_user_pages FOLL_PIN is always set internally by this function. pin_user_pages_fast FOLL_PIN is always set internally by this function. pin_user_pages_remote FOLL_PIN is always set internally by this function.”h]”hŒõFunction -------- pin_user_pages FOLL_PIN is always set internally by this function. pin_user_pages_fast FOLL_PIN is always set internally by this function. pin_user_pages_remote FOLL_PIN is always set internally by this function.”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j$h³hÇh´KGhj»h²hubhí)�”}”(hXJFor these get_user_pages*() functions, FOLL_GET might not even be specified. Behavior is a little more complex than above. If FOLL_GET was *not* specified, but the caller passed in a non-null struct pages* array, then the function sets FOLL_GET for you, and proceeds to pin pages by incrementing the refcount of each page by +1.::”h]”(hŒ‹For these get_user_pages*() functions, FOLL_GET might not even be specified. Behavior is a little more complex than above. If FOLL_GET was ”…”�”}”(hjh²hh³Nh´Nubjq)�”}”(hŒ*not*”h]”hŒnot”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphjubhŒ¹ specified, but the caller passed in a non-null struct pages* array, then the function sets FOLL_GET for you, and proceeds to pin pages by incrementing the refcount of each page by +1.:”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´KMhj»h²hubj%)�”}”(hXFunction -------- get_user_pages FOLL_GET is sometimes set internally by this function. get_user_pages_fast FOLL_GET is sometimes set internally by this function. get_user_pages_remote FOLL_GET is sometimes set internally by this function.”h]”hXFunction -------- get_user_pages FOLL_GET is sometimes set internally by this function. get_user_pages_fast FOLL_GET is sometimes set internally by this function. get_user_pages_remote FOLL_GET is sometimes set internally by this function.”…”�”}”hj2sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j$h³hÇh´KShj»h²hubeh}”(h]”jFah ]”h"]”Œ#which flags are set by each wrapper”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K3ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒTracking dma-pinned pages”h]”hŒTracking dma-pinned pages”…”�”}”(hjJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”jjbuh1hÍhjGh²hh³hÇh´KZubhí)�”}”(hŒQSome of the key design constraints, and solutions, for tracking dma-pinned pages:”h]”hŒQSome of the key design constraints, and solutions, for tracking dma-pinned pages:”…”�”}”(hjXh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´K\hjGh²hubhã)�”}”(hhh]”(hè)�”}”(hŒvAn actual reference count, per struct page, is required. This is because multiple processes may pin and unpin a page. ”h]”hí)�”}”(hŒuAn actual reference count, per struct page, is required. This is because multiple processes may pin and unpin a page.”h]”hŒuAn actual reference count, per struct page, is required. This is because multiple processes may pin and unpin a page.”…”�”}”(hjmh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´K_hjiubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhjfh²hh³hÇh´Nubhè)�”}”(hŒ{False positives (reporting that a page is dma-pinned, when in fact it is not) are acceptable, but false negatives are not. ”h]”hí)�”}”(hŒzFalse positives (reporting that a page is dma-pinned, when in fact it is not) are acceptable, but false negatives are not.”h]”hŒzFalse positives (reporting that a page is dma-pinned, when in fact it is not) are acceptable, but false negatives are not.”…”�”}”(hj…h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´Kbhj�ubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhjfh²hh³hÇh´Nubhè)�”}”(hŒTstruct page may not be increased in size for this, and all fields are already used. ”h]”hí)�”}”(hŒSstruct page may not be increased in size for this, and all fields are already used.”h]”hŒSstruct page may not be increased in size for this, and all fields are already used.”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´Kehj™ubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhjfh²hh³hÇh´Nubhè)�”}”(hXëGiven the above, we can overload the page->_refcount field by using, sort of, the upper bits in that field for a dma-pinned count. "Sort of", means that, rather than dividing page->_refcount into bit fields, we simple add a medium- large value (GUP_PIN_COUNTING_BIAS, initially chosen to be 1024: 10 bits) to page->_refcount. This provides fuzzy behavior: if a page has get_page() called on it 1024 times, then it will appear to have a single dma-pinned count. And again, that's acceptable. ”h]”hí)�”}”(hXêGiven the above, we can overload the page->_refcount field by using, sort of, the upper bits in that field for a dma-pinned count. "Sort of", means that, rather than dividing page->_refcount into bit fields, we simple add a medium- large value (GUP_PIN_COUNTING_BIAS, initially chosen to be 1024: 10 bits) to page->_refcount. This provides fuzzy behavior: if a page has get_page() called on it 1024 times, then it will appear to have a single dma-pinned count. And again, that's acceptable.”h]”hXðGiven the above, we can overload the page->_refcount field by using, sort of, the upper bits in that field for a dma-pinned count. “Sort ofâ€�, means that, rather than dividing page->_refcount into bit fields, we simple add a medium- large value (GUP_PIN_COUNTING_BIAS, initially chosen to be 1024: 10 bits) to page->_refcount. This provides fuzzy behavior: if a page has get_page() called on it 1024 times, then it will appear to have a single dma-pinned count. And again, that’s acceptable.”…”�”}”(hjµh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´Khhj±ubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhjfh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ*”uh1hâh³hÇh´K_hjGh²hubhí)�”}”(hŒxThis also leads to limitations: there are only 31-10==21 bits available for a counter that increments 10 bits at a time.”h]”hŒxThis also leads to limitations: there are only 31-10==21 bits available for a counter that increments 10 bits at a time.”…”�”}”(hjÑh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´KphjGh²hubhã)�”}”(hhh]”(hè)�”}”(hX?Because of that limitation, special handling is applied to the zero pages when using FOLL_PIN. We only pretend to pin a zero page - we don't alter its refcount or pincount at all (it is permanent, so there's no need). The unpinning functions also don't do anything to a zero page. This is transparent to the caller. ”h]”hí)�”}”(hX>Because of that limitation, special handling is applied to the zero pages when using FOLL_PIN. We only pretend to pin a zero page - we don't alter its refcount or pincount at all (it is permanent, so there's no need). The unpinning functions also don't do anything to a zero page. This is transparent to the caller.”h]”hXDBecause of that limitation, special handling is applied to the zero pages when using FOLL_PIN. We only pretend to pin a zero page - we don’t alter its refcount or pincount at all (it is permanent, so there’s no need). The unpinning functions also don’t do anything to a zero page. This is transparent to the caller.”…”�”}”(hjæh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´Kshjâubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhjßh²hh³hÇh´Nubhè)�”}”(hŒÅCallers must specifically request "dma-pinned tracking of pages". In other words, just calling get_user_pages() will not suffice; a new set of functions, pin_user_page() and related, must be used. ”h]”hí)�”}”(hŒÄCallers must specifically request "dma-pinned tracking of pages". In other words, just calling get_user_pages() will not suffice; a new set of functions, pin_user_page() and related, must be used.”h]”hŒÈCallers must specifically request “dma-pinned tracking of pagesâ€�. In other words, just calling get_user_pages() will not suffice; a new set of functions, pin_user_page() and related, must be used.”…”�”}”(hjþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´Kyhjúubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhjßh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jÏjÐuh1hâh³hÇh´KshjGh²hubeh}”(h]”jhah ]”h"]”Œtracking dma-pinned pages”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KZubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ:FOLL_PIN, FOLL_GET, FOLL_LONGTERM: when to use which flags”h]”hŒ:FOLL_PIN, FOLL_GET, FOLL_LONGTERM: when to use which flags”…”�”}”(hj"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”jj„uh1hÍhjh²hh³hÇh´K~ubhí)�”}”(hŒbThanks to Jan Kara, Vlastimil Babka and several other -mm people, for describing these categories:”h]”hŒbThanks to Jan Kara, Vlastimil Babka and several other -mm people, for describing these categories:”…”�”}”(hj0h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´K€hjh²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒCASE 1: Direct IO (DIO)”h]”hŒCASE 1: Direct IO (DIO)”…”�”}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”jj£uh1hÍhj>h²hh³hÇh´K„ubhí)�”}”(hXThere are GUP references to pages that are serving as DIO buffers. These buffers are needed for a relatively short time (so they are not "long term"). No special synchronization with folio_mkclean() or munmap() is provided. Therefore, flags to set at the call site are: ::”h]”hXThere are GUP references to pages that are serving as DIO buffers. These buffers are needed for a relatively short time (so they are not “long termâ€�). No special synchronization with folio_mkclean() or munmap() is provided. Therefore, flags to set at the call site are:”…”�”}”(hjOh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´K…hj>h²hubj%)�”}”(hŒFOLL_PIN”h]”hŒFOLL_PIN”…”�”}”hj]sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j$h³hÇh´KŠhj>h²hubhí)�”}”(hŒ|...but rather than setting FOLL_PIN directly, call sites should use one of the pin_user_pages*() routines that set FOLL_PIN.”h]”hŒ|...but rather than setting FOLL_PIN directly, call sites should use one of the pin_user_pages*() routines that set FOLL_PIN.”…”�”}”(hjkh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´KŒhj>h²hubeh}”(h]”j©ah ]”h"]”Œcase 1: direct io (dio)”ah$]”h&]”uh1hÈhjh²hh³hÇh´K„ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ CASE 2: RDMA”h]”hŒ CASE 2: RDMA”…”�”}”(hjƒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”jjÅuh1hÍhj€h²hh³hÇh´K�ubhí)�”}”(hŒôThere are GUP references to pages that are serving as DMA buffers. These buffers are needed for a long time ("long term"). No special synchronization with folio_mkclean() or munmap() is provided. Therefore, flags to set at the call site are: ::”h]”hŒõThere are GUP references to pages that are serving as DMA buffers. These buffers are needed for a long time (“long termâ€�). No special synchronization with folio_mkclean() or munmap() is provided. Therefore, flags to set at the call site are:”…”�”}”(hj‘h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´K‘hj€h²hubj%)�”}”(hŒFOLL_PIN | FOLL_LONGTERM”h]”hŒFOLL_PIN | FOLL_LONGTERM”…”�”}”hjŸsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j$h³hÇh´K–hj€h²hubhí)�”}”(hŒéNOTE: Some pages, such as DAX pages, cannot be pinned with longterm pins. That's because DAX pages do not have a separate page cache, and so "pinning" implies locking down file system blocks, which is not (yet) supported in that way.”h]”hŒïNOTE: Some pages, such as DAX pages, cannot be pinned with longterm pins. That’s because DAX pages do not have a separate page cache, and so “pinningâ€� implies locking down file system blocks, which is not (yet) supported in that way.”…”�”}”(hj­h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´K˜hj€h²hubhŒtarget”“”)�”}”(hŒ#.. _mmu-notifier-registration-case:”h]”h}”(h]”h ]”h"]”h$]”h&]”jŒmmu-notifier-registration-case”uh1j»h´Kœhj€h²hh³hÇubeh}”(h]”jËah ]”h"]”Œ case 2: rdma”ah$]”h&]”uh1hÈhjh²hh³hÇh´K�ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒICASE 3: MMU notifier registration, with or without page faulting hardware”h]”hŒICASE 3: MMU notifier registration, with or without page faulting hardware”…”�”}”(hjÒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”jjçuh1hÍhjÏh²hh³hÇh´KŸubhí)�”}”(hX~Device drivers can pin pages via get_user_pages*(), and register for mmu notifier callbacks for the memory range. Then, upon receiving a notifier "invalidate range" callback , stop the device from using the range, and unpin the pages. There may be other possible schemes, such as for example explicitly synchronizing against pending IO, that accomplish approximately the same thing.”h]”hX‚Device drivers can pin pages via get_user_pages*(), and register for mmu notifier callbacks for the memory range. Then, upon receiving a notifier “invalidate rangeâ€� callback , stop the device from using the range, and unpin the pages. There may be other possible schemes, such as for example explicitly synchronizing against pending IO, that accomplish approximately the same thing.”…”�”}”(hjàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´K hjÏh²hubhí)�”}”(hX*Or, if the hardware supports replayable page faults, then the device driver can avoid pinning entirely (this is ideal), as follows: register for mmu notifier callbacks as above, but instead of stopping the device and unpinning in the callback, simply remove the range from the device's page tables.”h]”hX,Or, if the hardware supports replayable page faults, then the device driver can avoid pinning entirely (this is ideal), as follows: register for mmu notifier callbacks as above, but instead of stopping the device and unpinning in the callback, simply remove the range from the device’s page tables.”…”�”}”(hjîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´K¦hjÏh²hubhí)�”}”(hŒÚEither way, as long as the driver unpins the pages upon mmu notifier callback, then there is proper synchronization with both filesystem and mm (folio_mkclean(), munmap(), etc). Therefore, neither flag needs to be set.”h]”hŒÚEither way, as long as the driver unpins the pages upon mmu notifier callback, then there is proper synchronization with both filesystem and mm (folio_mkclean(), munmap(), etc). Therefore, neither flag needs to be set.”…”�”}”(hjüh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´K«hjÏh²hubeh}”(h]”(jíjÇeh ]”h"]”(ŒIcase 3: mmu notifier registration, with or without page faulting hardware”Œmmu-notifier-registration-case”eh$]”h&]”uh1hÈhjh²hh³hÇh´KŸŒexpect_referenced_by_name”}”jj½sŒexpect_referenced_by_id”}”jÇj½subhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ1CASE 4: Pinning for struct page manipulation only”h]”hŒ1CASE 4: Pinning for struct page manipulation only”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”jj uh1hÍhjh²hh³hÇh´K°ubhí)�”}”(hŒ°If only struct page data (as opposed to the actual memory contents that a page is tracking) is affected, then normal GUP calls are sufficient, and neither flag needs to be set.”h]”hŒ°If only struct page data (as opposed to the actual memory contents that a page is tracking) is affected, then normal GUP calls are sufficient, and neither flag needs to be set.”…”�”}”(hj'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´K±hjh²hubeh}”(h]”jah ]”h"]”Œ1case 4: pinning for struct page manipulation only”ah$]”h&]”uh1hÈhjh²hh³hÇh´K°ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ=CASE 5: Pinning in order to write to the data within the page”h]”hŒ=CASE 5: Pinning in order to write to the data within the page”…”�”}”(hj?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”jj+uh1hÍhj<h²hh³hÇh´K¶ubhí)�”}”(hXXEven though neither DMA nor Direct IO is involved, just a simple case of "pin, write to a page's data, unpin" can cause a problem. Case 5 may be considered a superset of Case 1, plus Case 2, plus anything that invokes that pattern. In other words, if the code is neither Case 1 nor Case 2, it may still require FOLL_PIN, for patterns like this:”h]”hX^Even though neither DMA nor Direct IO is involved, just a simple case of “pin, write to a page’s data, unpinâ€� can cause a problem. Case 5 may be considered a superset of Case 1, plus Case 2, plus anything that invokes that pattern. In other words, if the code is neither Case 1 nor Case 2, it may still require FOLL_PIN, for patterns like this:”…”�”}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´K·hj<h²hubhŒdefinition_list”“”)�”}”(hhh]”(hŒdefinition_list_item”“”)�”}”(hŒfCorrect (uses FOLL_PIN calls): pin_user_pages() write to the data within the pages unpin_user_pages() ”h]”(hŒterm”“”)�”}”(hŒCorrect (uses FOLL_PIN calls):”h]”hŒCorrect (uses FOLL_PIN calls):”…”�”}”(hjhh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfh³hÇh´KÀhjbubhŒ definition”“”)�”}”(hhh]”hí)�”}”(hŒFpin_user_pages() write to the data within the pages unpin_user_pages()”h]”hŒFpin_user_pages() write to the data within the pages unpin_user_pages()”…”�”}”(hj{h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´K¾hjxubah}”(h]”h ]”h"]”h$]”h&]”uh1jvhjbubeh}”(h]”h ]”h"]”h$]”h&]”uh1j`h³hÇh´KÀhj]ubja)�”}”(hŒ`INCORRECT (uses FOLL_GET calls): get_user_pages() write to the data within the pages put_page() ”h]”(jg)�”}”(hŒ INCORRECT (uses FOLL_GET calls):”h]”hŒ INCORRECT (uses FOLL_GET calls):”…”�”}”(hj™h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfh³hÇh´KÅhj•ubjw)�”}”(hhh]”hí)�”}”(hŒ>get_user_pages() write to the data within the pages put_page()”h]”hŒ>get_user_pages() write to the data within the pages put_page()”…”�”}”(hjªh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´KÃhj§ubah}”(h]”h ]”h"]”h$]”h&]”uh1jvhj•ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j`h³hÇh´KÅhj]h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1j[hj<h²hh³hÇh´Nubeh}”(h]”j1ah ]”h"]”Œ=case 5: pinning in order to write to the data within the page”ah$]”h&]”uh1hÈhjh²hh³hÇh´K¶ubeh}”(h]”jŠah ]”h"]”Œ:foll_pin, foll_get, foll_longterm: when to use which flags”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K~ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ4folio_maybe_dma_pinned(): the whole point of pinning”h]”hŒ4folio_maybe_dma_pinned(): the whole point of pinning”…”�”}”(hjÛh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”jjYuh1hÍhjØh²hh³hÇh´KÈubhí)�”}”(hX(The whole point of marking folios as "DMA-pinned" or "gup-pinned" is to be able to query, "is this folio DMA-pinned?" That allows code such as folio_mkclean() (and file system writeback code in general) to make informed decisions about what to do when a folio cannot be unmapped due to such pins.”h]”hX4The whole point of marking folios as “DMA-pinnedâ€� or “gup-pinnedâ€� is to be able to query, “is this folio DMA-pinned?â€� That allows code such as folio_mkclean() (and file system writeback code in general) to make informed decisions about what to do when a folio cannot be unmapped due to such pins.”…”�”}”(hjéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´KÊhjØh²hubhí)�”}”(hX What to do in those cases is the subject of a years-long series of discussions and debates (see the References at the end of this document). It's a TODO item here: fill in the details once that's worked out. Meanwhile, it's safe to say that having this available: ::”h]”hX What to do in those cases is the subject of a years-long series of discussions and debates (see the References at the end of this document). It’s a TODO item here: fill in the details once that’s worked out. Meanwhile, it’s safe to say that having this available:”…”�”}”(hj÷h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´KÏhjØh²hubj%)�”}”(hŒ>static inline bool folio_maybe_dma_pinned(struct folio *folio)”h]”hŒ>static inline bool folio_maybe_dma_pinned(struct folio *folio)”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j$h³hÇh´KÔhjØh²hubhí)�”}”(hŒA...is a prerequisite to solving the long-running gup+DMA problem.”h]”hŒA...is a prerequisite to solving the long-running gup+DMA problem.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´KÖhjØh²hubeh}”(h]”j_ah ]”h"]”Œ4folio_maybe_dma_pinned(): the whole point of pinning”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KÈubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒCAnother way of thinking about FOLL_GET, FOLL_PIN, and FOLL_LONGTERM”h]”hŒCAnother way of thinking about FOLL_GET, FOLL_PIN, and FOLL_LONGTERM”…”�”}”(hj+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”jj{uh1hÍhj(h²hh³hÇh´KÙubhí)�”}”(hX Another way of thinking about these flags is as a progression of restrictions: FOLL_GET is for struct page manipulation, without affecting the data that the struct page refers to. FOLL_PIN is a *replacement* for FOLL_GET, and is for short term pins on pages whose data *will* get accessed. As such, FOLL_PIN is a "more severe" form of pinning. And finally, FOLL_LONGTERM is an even more restrictive case that has FOLL_PIN as a prerequisite: this is for pages that will be pinned longterm, and whose data will be accessed.”h]”(hŒÂAnother way of thinking about these flags is as a progression of restrictions: FOLL_GET is for struct page manipulation, without affecting the data that the struct page refers to. FOLL_PIN is a ”…”�”}”(hj9h²hh³Nh´Nubjq)�”}”(hŒ *replacement*”h]”hŒ replacement”…”�”}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphj9ubhŒ> for FOLL_GET, and is for short term pins on pages whose data ”…”�”}”(hj9h²hh³Nh´Nubjq)�”}”(hŒ*will*”h]”hŒwill”…”�”}”(hjSh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jphj9ubhŒú get accessed. As such, FOLL_PIN is a “more severeâ€� form of pinning. And finally, FOLL_LONGTERM is an even more restrictive case that has FOLL_PIN as a prerequisite: this is for pages that will be pinned longterm, and whose data will be accessed.”…”�”}”(hj9h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´KÛhj(h²hubeh}”(h]”j�ah ]”h"]”ŒCanother way of thinking about foll_get, foll_pin, and foll_longterm”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KÙubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ Unit testing”h]”hŒ Unit testing”…”�”}”(hjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”jj�uh1hÍhjrh²hh³hÇh´Käubhí)�”}”(hŒ This file::”h]”hŒ This file:”…”�”}”(hjƒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´Kåhjrh²hubj%)�”}”(hŒ%tools/testing/selftests/mm/gup_test.c”h]”hŒ%tools/testing/selftests/mm/gup_test.c”…”�”}”hj‘sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j$h³hÇh´Kçhjrh²hubhí)�”}”(hŒIhas the following new calls to exercise the new pin*() wrapper functions:”h]”hŒIhas the following new calls to exercise the new pin*() wrapper functions:”…”�”}”(hjŸh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´Kéhjrh²hubhã)�”}”(hhh]”(hè)�”}”(hŒ"PIN_FAST_BENCHMARK (./gup_test -a)”h]”hí)�”}”(hj²h]”hŒ"PIN_FAST_BENCHMARK (./gup_test -a)”…”�”}”(hj´h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´Këhj°ubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhj­h²hh³hÇh´Nubhè)�”}”(hŒPIN_BASIC_TEST (./gup_test -b) ”h]”hí)�”}”(hŒPIN_BASIC_TEST (./gup_test -b)”h]”hŒPIN_BASIC_TEST (./gup_test -b)”…”�”}”(hjËh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´KìhjÇubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhj­h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jÏjÐuh1hâh³hÇh´Këhjrh²hubhí)�”}”(hŒ‘You can monitor how many total dma-pinned pages have been acquired and released since the system was booted, via two new /proc/vmstat entries: ::”h]”hŒŽYou can monitor how many total dma-pinned pages have been acquired and released since the system was booted, via two new /proc/vmstat entries:”…”�”}”(hjåh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´Kîhjrh²hubj%)�”}”(hŒC/proc/vmstat/nr_foll_pin_acquired /proc/vmstat/nr_foll_pin_released”h]”hŒC/proc/vmstat/nr_foll_pin_acquired /proc/vmstat/nr_foll_pin_released”…”�”}”hjósbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j$h³hÇh´Kñhjrh²hubhí)�”}”(hŒ�Under normal conditions, these two values will be equal unless there are any long-term [R]DMA pins in place, or during pin/unpin transitions.”h]”hŒ�Under normal conditions, these two values will be equal unless there are any long-term [R]DMA pins in place, or during pin/unpin transitions.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´Kôhjrh²hubhã)�”}”(hhh]”(hè)�”}”(hX³nr_foll_pin_acquired: This is the number of logical pins that have been acquired since the system was powered on. For huge pages, the head page is pinned once for each page (head page and each tail page) within the huge page. This follows the same sort of behavior that get_user_pages() uses for huge pages: the head page is refcounted once for each tail or head page in the huge page, when get_user_pages() is applied to a huge page. ”h]”hí)�”}”(hX²nr_foll_pin_acquired: This is the number of logical pins that have been acquired since the system was powered on. For huge pages, the head page is pinned once for each page (head page and each tail page) within the huge page. This follows the same sort of behavior that get_user_pages() uses for huge pages: the head page is refcounted once for each tail or head page in the huge page, when get_user_pages() is applied to a huge page.”h]”hX²nr_foll_pin_acquired: This is the number of logical pins that have been acquired since the system was powered on. For huge pages, the head page is pinned once for each page (head page and each tail page) within the huge page. This follows the same sort of behavior that get_user_pages() uses for huge pages: the head page is refcounted once for each tail or head page in the huge page, when get_user_pages() is applied to a huge page.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´K÷hjubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhjh²hh³hÇh´Nubhè)�”}”(hXÃnr_foll_pin_released: The number of logical pins that have been released since the system was powered on. Note that pages are released (unpinned) on a PAGE_SIZE granularity, even if the original pin was applied to a huge page. Becaused of the pin count behavior described above in "nr_foll_pin_acquired", the accounting balances out, so that after doing this:: pin_user_pages(huge_page); for (each page in huge_page) unpin_user_page(page); ”h]”(hí)�”}”(hXhnr_foll_pin_released: The number of logical pins that have been released since the system was powered on. Note that pages are released (unpinned) on a PAGE_SIZE granularity, even if the original pin was applied to a huge page. Becaused of the pin count behavior described above in "nr_foll_pin_acquired", the accounting balances out, so that after doing this::”h]”hXknr_foll_pin_released: The number of logical pins that have been released since the system was powered on. Note that pages are released (unpinned) on a PAGE_SIZE granularity, even if the original pin was applied to a huge page. Becaused of the pin count behavior described above in “nr_foll_pin_acquiredâ€�, the accounting balances out, so that after doing this:”…”�”}”(hj.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´Kþhj*ubj%)�”}”(hŒRpin_user_pages(huge_page); for (each page in huge_page) unpin_user_page(page);”h]”hŒRpin_user_pages(huge_page); for (each page in huge_page) unpin_user_page(page);”…”�”}”hj<sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j$h³hÇh´Mhj*ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hçhjh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jÏjÐuh1hâh³hÇh´K÷hjrh²hubhí)�”}”(hŒ...the following is expected::”h]”hŒ...the following is expected:”…”�”}”(hjVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´Mhjrh²hubj%)�”}”(hŒ,nr_foll_pin_released == nr_foll_pin_acquired”h]”hŒ,nr_foll_pin_released == nr_foll_pin_acquired”…”�”}”hjdsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1j$h³hÇh´M hjrh²hubhí)�”}”(hŒU(...unless it was already out of balance due to a long-term RDMA pin being in place.)”h]”hŒU(...unless it was already out of balance due to a long-term RDMA pin being in place.)”…”�”}”(hjrh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´M hjrh²hubeh}”(h]”j£ah ]”h"]”Œ unit testing”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KäubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒOther diagnostics”h]”hŒOther diagnostics”…”�”}”(hjŠh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”jj¿uh1hÍhj‡h²hh³hÇh´Mubhí)�”}”(hŒ½dump_page() has been enhanced slightly to handle these new counting fields, and to better report on large folios in general. Specifically, for large folios, the exact pincount is reported.”h]”hŒ½dump_page() has been enhanced slightly to handle these new counting fields, and to better report on large folios in general. Specifically, for large folios, the exact pincount is reported.”…”�”}”(hj˜h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´Mhj‡h²hubeh}”(h]”jÅah ]”h"]”Œother diagnostics”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´MubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ References”h]”hŒ References”…”�”}”(hj°h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”jjáuh1hÍhj­h²hh³hÇh´Mubhã)�”}”(hhh]”(hè)�”}”(hŒZ`Some slow progress on get_user_pages() (Apr 2, 2019) `_”h]”hí)�”}”(hjÃh]”(hò)�”}”(hjÃh]”hŒ4Some slow progress on get_user_pages() (Apr 2, 2019)”…”�”}”(hjÈh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œ4Some slow progress on get_user_pages() (Apr 2, 2019)”Œrefuri”Œ https://lwn.net/Articles/784574/”uh1hñhjÅubj¼)�”}”(hŒ# ”h]”h}”(h]”Œ/some-slow-progress-on-get-user-pages-apr-2-2019”ah ]”h"]”Œ4some slow progress on get_user_pages() (apr 2, 2019)”ah$]”h&]”Œrefuri”jØuh1j»Œ referenced”KhjÅubeh}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´MhjÁubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhj¾h²hh³hÇh´Nubhè)�”}”(hŒR`DMA and get_user_pages() (LPC: Dec 12, 2018) `_”h]”hí)�”}”(hjõh]”(hò)�”}”(hjõh]”hŒ,DMA and get_user_pages() (LPC: Dec 12, 2018)”…”�”}”(hjúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œ,DMA and get_user_pages() (LPC: Dec 12, 2018)”j׌ https://lwn.net/Articles/774411/”uh1hñhj÷ubj¼)�”}”(hŒ# ”h]”h}”(h]”Œ&dma-and-get-user-pages-lpc-dec-12-2018”ah ]”h"]”Œ,dma and get_user_pages() (lpc: dec 12, 2018)”ah$]”h&]”Œrefuri”j uh1j»jæKhj÷ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´Mhjóubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhj¾h²hh³hÇh´Nubhè)�”}”(hŒV`The trouble with get_user_pages() (Apr 30, 2018) `_”h]”hí)�”}”(hj% h]”(hò)�”}”(hj% h]”hŒ0The trouble with get_user_pages() (Apr 30, 2018)”…”�”}”(hj* h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œ0The trouble with get_user_pages() (Apr 30, 2018)”j׌ https://lwn.net/Articles/753027/”uh1hñhj' ubj¼)�”}”(hŒ# ”h]”h}”(h]”Œ+the-trouble-with-get-user-pages-apr-30-2018”ah ]”h"]”Œ0the trouble with get_user_pages() (apr 30, 2018)”ah$]”h&]”Œrefuri”j9 uh1j»jæKhj' ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´Mhj# ubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhj¾h²hh³hÇh´Nubhè)�”}”(hŒg`LWN kernel index: get_user_pages() `_ ”h]”hí)�”}”(hŒf`LWN kernel index: get_user_pages() `_”h]”(hò)�”}”(hjY h]”hŒ"LWN kernel index: get_user_pages()”…”�”}”(hj[ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œ"LWN kernel index: get_user_pages()”j׌>https://lwn.net/Kernel/Index/#Memory_management-get_user_pages”uh1hñhjW ubj¼)�”}”(hŒA ”h]”h}”(h]”Œlwn-kernel-index-get-user-pages”ah ]”h"]”Œ"lwn kernel index: get_user_pages()”ah$]”h&]”Œrefuri”jj uh1j»jæKhjW ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´MhjS ubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhj¾h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jÏjÐuh1hâh³hÇh´Mhj­h²hubhí)�”}”(hŒJohn Hubbard, October, 2019”h]”hŒJohn Hubbard, October, 2019”…”�”}”(hjŠ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hìh³hÇh´Mhj­h²hubeh}”(h]”jçah ]”h"]”Œ references”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´Mubeh}”(h]”Œ pin-user-pages-and-related-calls”ah ]”h"]”Œ"pin_user_pages() and related calls”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)�”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jÊ Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”jÇ]”j½asŒnameids”}”(j¤ j¡ jjüj8jj¸j$jDjFjjhjÕjŠj}j©jÌjËjjÇjjíj9jjÎj1j%j_joj�j„j£jªjÅjœ jçjâjßj j jC j@ jt jq uŒ nametypes”}”(j¤ ‰j‰j8‰j¸‰jD‰j‰jÕ‰j}‰j̉jˆj‰j9‰jΉj%‰jo‰j„‰jª‰jœ ‰jâˆj ˆjC ˆjt ˆuh}”(j¡ hÊjühßjjj$j;jFj»jhjGjŠjj©j>jËj€jÇjÏjíjÏjjj1j<j_jØj�j(j£jrjÅj‡jçj­jßjÙj j j@ j: jq jk hühójjj@j7jbjYj„j{j£jšjÅj¼jçjÞj jj+j"jYjPj{jrj�j”j¿j¶jájØuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”jØ Ks…”R”Œparse_messages”]”Œtransform_messages”]”hŒsystem_message”“”)�”}”(hhh]”hí)�”}”(hhh]”hŒDHyperlink target "mmu-notifier-registration-case" is not referenced.”…”�”}”hj4 sbah}”(h]”h ]”h"]”h$]”h&]”uh1hìhj1 ubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”hÇŒline”Kœuh1j/ ubaŒ transformer”NŒ include_log”]”Œ decoration”Nh²hub.