€•eŒ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”Œ1/translations/zh_CN/filesystems/nfs/nfsd-io-modes”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ1/translations/zh_TW/filesystems/nfs/nfsd-io-modes”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ1/translations/it_IT/filesystems/nfs/nfsd-io-modes”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ1/translations/ja_JP/filesystems/nfs/nfsd-io-modes”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ1/translations/ko_KR/filesystems/nfs/nfsd-io-modes”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ1/translations/pt_BR/filesystems/nfs/nfsd-io-modes”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ1/translations/sp_SP/filesystems/nfs/nfsd-io-modes”Œ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³ŒK/var/lib/git/docbuild/linux/Documentation/filesystems/nfs/nfsd-io-modes.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ NFSD IO MODES”h]”hŒ NFSD IO MODES”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒOverview”h]”hŒOverview”…””}”(hhàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÝh²hh³hÇh´KubhŒ paragraph”“”)”}”(hŒÓNFSD has historically always used buffered IO when servicing READ and WRITE operations. BUFFERED is NFSD's default IO mode, but it is possible to override that default to use either DONTCACHE or DIRECT IO modes.”h]”hŒÕNFSD has historically always used buffered IO when servicing READ and WRITE operations. BUFFERED is NFSD’s default IO mode, but it is possible to override that default to use either DONTCACHE or DIRECT IO modes.”…””}”(hhðh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K hhÝh²hubhï)”}”(hŒŽExperimental NFSD debugfs interfaces are available to allow the NFSD IO mode used for READ and WRITE to be configured independently. See both:”h]”hŒŽExperimental NFSD debugfs interfaces are available to allow the NFSD IO mode used for READ and WRITE to be configured independently. See both:”…””}”(hhþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhhÝh²hubhŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒ$/sys/kernel/debug/nfsd/io_cache_read”h]”hï)”}”(hjh]”hŒ$/sys/kernel/debug/nfsd/io_cache_read”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubj)”}”(hŒ&/sys/kernel/debug/nfsd/io_cache_write ”h]”hï)”}”(hŒ%/sys/kernel/debug/nfsd/io_cache_write”h]”hŒ%/sys/kernel/debug/nfsd/io_cache_write”…””}”(hj.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khj*ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1j h³hÇh´KhhÝh²hubhï)”}”(hŒzThe default value for both io_cache_read and io_cache_write reflects NFSD's default IO mode (which is NFSD_IO_BUFFERED=0).”h]”hŒ|The default value for both io_cache_read and io_cache_write reflects NFSD’s default IO mode (which is NFSD_IO_BUFFERED=0).”…””}”(hjJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhhÝh²hubhï)”}”(hŒ;Based on the configured settings, NFSD's IO will either be:”h]”hŒ=Based on the configured settings, NFSD’s IO will either be:”…””}”(hjXh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhhÝh²hubj )”}”(hhh]”(j)”}”(hŒ,cached using page cache (NFSD_IO_BUFFERED=0)”h]”hï)”}”(hjkh]”hŒ,cached using page cache (NFSD_IO_BUFFERED=0)”…””}”(hjmh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khjiubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjfh²hh³hÇh´Nubj)”}”(hŒFcached but removed from page cache on completion (NFSD_IO_DONTCACHE=1)”h]”hï)”}”(hj‚h]”hŒFcached but removed from page cache on completion (NFSD_IO_DONTCACHE=1)”…””}”(hj„h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khj€ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjfh²hh³hÇh´Nubj)”}”(hŒ6not cached stable_how=NFS_UNSTABLE (NFSD_IO_DIRECT=2) ”h]”hï)”}”(hŒ5not cached stable_how=NFS_UNSTABLE (NFSD_IO_DIRECT=2)”h]”hŒ5not cached stable_how=NFS_UNSTABLE (NFSD_IO_DIRECT=2)”…””}”(hj›h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khj—ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjfh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jHjIuh1j h³hÇh´KhhÝh²hubhï)”}”(hŒuTo set an NFSD IO mode, write a supported value (0 - 2) to the corresponding IO operation's debugfs interface, e.g.::”h]”hŒvTo set an NFSD IO mode, write a supported value (0 - 2) to the corresponding IO operation’s debugfs interface, e.g.:”…””}”(hjµh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhhÝh²hubhŒ literal_block”“”)”}”(hŒ\echo 2 > /sys/kernel/debug/nfsd/io_cache_read echo 2 > /sys/kernel/debug/nfsd/io_cache_write”h]”hŒ\echo 2 > /sys/kernel/debug/nfsd/io_cache_read echo 2 > /sys/kernel/debug/nfsd/io_cache_write”…””}”hjÅsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jÃh³hÇh´K hhÝh²hubhï)”}”(hŒ~To check which IO mode NFSD is using for READ or WRITE, simply read the corresponding IO operation's debugfs interface, e.g.::”h]”hŒTo check which IO mode NFSD is using for READ or WRITE, simply read the corresponding IO operation’s debugfs interface, e.g.:”…””}”(hjÓh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K#hhÝh²hubjÄ)”}”(hŒRcat /sys/kernel/debug/nfsd/io_cache_read cat /sys/kernel/debug/nfsd/io_cache_write”h]”hŒRcat /sys/kernel/debug/nfsd/io_cache_read cat /sys/kernel/debug/nfsd/io_cache_write”…””}”hjásbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jÃh³hÇh´K&hhÝh²hubhï)”}”(hŒ‡If you experiment with NFSD's IO modes on a recent kernel and have interesting results, please report them to linux-nfs@vger.kernel.org”h]”(hŒpIf you experiment with NFSD’s IO modes on a recent kernel and have interesting results, please report them to ”…””}”(hjïh²hh³Nh´NubhŒ reference”“”)”}”(hŒlinux-nfs@vger.kernel.org”h]”hŒlinux-nfs@vger.kernel.org”…””}”(hjùh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œ mailto:linux-nfs@vger.kernel.org”uh1j÷hjïubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K)hhÝh²hubeh}”(h]”Œoverview”ah ]”h"]”Œoverview”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒNFSD DONTCACHE”h]”hŒNFSD DONTCACHE”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjh²hh³hÇh´K-ubhï)”}”(hXGDONTCACHE offers a hybrid approach to servicing IO that aims to offer the benefits of using DIRECT IO without any of the strict alignment requirements that DIRECT IO imposes. To achieve this buffered IO is used but the IO is flagged to "drop behind" (meaning associated pages are dropped from the page cache) when IO completes.”h]”hXKDONTCACHE offers a hybrid approach to servicing IO that aims to offer the benefits of using DIRECT IO without any of the strict alignment requirements that DIRECT IO imposes. To achieve this buffered IO is used but the IO is flagged to “drop behind†(meaning associated pages are dropped from the page cache) when IO completes.”…””}”(hj(h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K/hjh²hubhï)”}”(hXpDONTCACHE aims to avoid what has proven to be a fairly significant limition of Linux's memory management subsystem if/when large amounts of data is infrequently accessed (e.g. read once _or_ written once but not read until much later). Such use-cases are particularly problematic because the page cache will eventually become a bottleneck to servicing new IO requests.”h]”hXrDONTCACHE aims to avoid what has proven to be a fairly significant limition of Linux’s memory management subsystem if/when large amounts of data is infrequently accessed (e.g. read once _or_ written once but not read until much later). Such use-cases are particularly problematic because the page cache will eventually become a bottleneck to servicing new IO requests.”…””}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K5hjh²hubhï)”}”(hŒEFor more context on DONTCACHE, please see these Linux commit headers:”h]”hŒEFor more context on DONTCACHE, please see these Linux commit headers:”…””}”(hjDh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhjUubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjRh²hh³hÇh´Nubj)”}”(hŒKfor READ: 8026e49bff9b1 ("mm/filemap: add read support for RWF_DONTCACHE")”h]”hï)”}”(hŒKfor READ: 8026e49bff9b1 ("mm/filemap: add read support for RWF_DONTCACHE")”h]”hŒOfor READ: 8026e49bff9b1 (“mm/filemap: add read support for RWF_DONTCACHEâ€)”…””}”(hjqh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K@hjmubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjRh²hh³hÇh´Nubj)”}”(hŒCfor WRITE: 974c5e6139db3 ("xfs: flag as supporting FOP_DONTCACHE") ”h]”hï)”}”(hŒBfor WRITE: 974c5e6139db3 ("xfs: flag as supporting FOP_DONTCACHE")”h]”hŒFfor WRITE: 974c5e6139db3 (“xfs: flag as supporting FOP_DONTCACHEâ€)”…””}”(hj‰h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KBhj…ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjRh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jHjIuh1j h³hÇh´K>hjh²hubhï)”}”(hŒ„NFSD_IO_DONTCACHE will fall back to NFSD_IO_BUFFERED if the underlying filesystem doesn't indicate support by setting FOP_DONTCACHE.”h]”hŒ†NFSD_IO_DONTCACHE will fall back to NFSD_IO_BUFFERED if the underlying filesystem doesn’t indicate support by setting FOP_DONTCACHE.”…””}”(hj£h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KDhjh²hubeh}”(h]”Œnfsd-dontcache”ah ]”h"]”Œnfsd dontcache”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K-ubhÉ)”}”(hhh]”(hÎ)”}”(hŒ NFSD DIRECT”h]”hŒ NFSD DIRECT”…””}”(hj¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj¹h²hh³hÇh´KHubhï)”}”(hŒÐDIRECT IO doesn't make use of the page cache, as such it is able to avoid the Linux memory management's page reclaim scalability problems without resorting to the hybrid use of page cache that DONTCACHE does.”h]”hŒÔDIRECT IO doesn’t make use of the page cache, as such it is able to avoid the Linux memory management’s page reclaim scalability problems without resorting to the hybrid use of page cache that DONTCACHE does.”…””}”(hjÊh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KJhj¹h²hubhï)”}”(hXËSome workloads benefit from NFSD avoiding the page cache, particularly those with a working set that is significantly larger than available system memory. The pathological worst-case workload that NFSD DIRECT has proven to help most is: NFS client issuing large sequential IO to a file that is 2-3 times larger than the NFS server's available system memory. The reason for such improvement is NFSD DIRECT eliminates a lot of work that the memory management subsystem would otherwise be required to perform (e.g. page allocation, dirty writeback, page reclaim). When using NFSD DIRECT, kswapd and kcompactd are no longer commanding CPU time trying to find adequate free pages so that forward IO progress can be made.”h]”hXÍSome workloads benefit from NFSD avoiding the page cache, particularly those with a working set that is significantly larger than available system memory. The pathological worst-case workload that NFSD DIRECT has proven to help most is: NFS client issuing large sequential IO to a file that is 2-3 times larger than the NFS server’s available system memory. The reason for such improvement is NFSD DIRECT eliminates a lot of work that the memory management subsystem would otherwise be required to perform (e.g. page allocation, dirty writeback, page reclaim). When using NFSD DIRECT, kswapd and kcompactd are no longer commanding CPU time trying to find adequate free pages so that forward IO progress can be made.”…””}”(hjØh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KNhj¹h²hubhï)”}”(hŒ The performance win associated with using NFSD DIRECT was previously discussed on linux-nfs, see: https://lore.kernel.org/linux-nfs/aEslwqa9iMeZjjlV@kernel.org/”h]”(hŒbThe performance win associated with using NFSD DIRECT was previously discussed on linux-nfs, see: ”…””}”(hjæh²hh³Nh´Nubjø)”}”(hŒ>https://lore.kernel.org/linux-nfs/aEslwqa9iMeZjjlV@kernel.org/”h]”hŒ>https://lore.kernel.org/linux-nfs/aEslwqa9iMeZjjlV@kernel.org/”…””}”(hjîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jðuh1j÷hjæubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KZhj¹h²hubhï)”}”(hŒBut in summary:”h]”hŒBut in summary:”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K^hj¹h²hubj )”}”(hhh]”(j)”}”(hŒ8NFSD DIRECT can significantly reduce memory requirements”h]”hï)”}”(hjh]”hŒ8NFSD DIRECT can significantly reduce memory requirements”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K`hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubj)”}”(hŒDNFSD DIRECT can reduce CPU load by avoiding costly page reclaim work”h]”hï)”}”(hj-h]”hŒDNFSD DIRECT can reduce CPU load by avoiding costly page reclaim work”…””}”(hj/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kahj+ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubj)”}”(hŒ8NFSD DIRECT can offer more deterministic IO performance ”h]”hï)”}”(hŒ7NFSD DIRECT can offer more deterministic IO performance”h]”hŒ7NFSD DIRECT can offer more deterministic IO performance”…””}”(hjFh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KbhjBubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jHjIuh1j h³hÇh´K`hj¹h²hubhï)”}”(hX.As always, your mileage may vary and so it is important to carefully consider if/when it is beneficial to make use of NFSD DIRECT. When assessing comparative performance of your workload please be sure to log relevant performance metrics during testing (e.g. memory usage, cpu usage, IO performance). Using perf to collect perf data that may be used to generate a "flamegraph" for work Linux must perform on behalf of your test is a really meaningful way to compare the relative health of the system and how switching NFSD's IO mode changes what is observed.”h]”hX4As always, your mileage may vary and so it is important to carefully consider if/when it is beneficial to make use of NFSD DIRECT. When assessing comparative performance of your workload please be sure to log relevant performance metrics during testing (e.g. memory usage, cpu usage, IO performance). Using perf to collect perf data that may be used to generate a “flamegraph†for work Linux must perform on behalf of your test is a really meaningful way to compare the relative health of the system and how switching NFSD’s IO mode changes what is observed.”…””}”(hj`h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kdhj¹h²hubhï)”}”(hXEIf NFSD_IO_DIRECT is specified by writing 2 (or 3 and 4 for WRITE) to NFSD's debugfs interfaces, ideally the IO will be aligned relative to the underlying block device's logical_block_size. Also the memory buffer used to store the READ or WRITE payload must be aligned relative to the underlying block device's dma_alignment.”h]”hXKIf NFSD_IO_DIRECT is specified by writing 2 (or 3 and 4 for WRITE) to NFSD’s debugfs interfaces, ideally the IO will be aligned relative to the underlying block device’s logical_block_size. Also the memory buffer used to store the READ or WRITE payload must be aligned relative to the underlying block device’s dma_alignment.”…””}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kmhj¹h²hubhï)”}”(hŒNBut NFSD DIRECT does handle misaligned IO in terms of O_DIRECT as best it can:”h]”hŒNBut NFSD DIRECT does handle misaligned IO in terms of O_DIRECT as best it can:”…””}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kshj¹h²hubhŒdefinition_list”“”)”}”(hhh]”(hŒdefinition_list_item”“”)”}”(hŒëMisaligned READ: If NFSD_IO_DIRECT is used, expand any misaligned READ to the next DIO-aligned block (on either end of the READ). The expanded READ is verified to have proper offset/len (logical_block_size) and dma_alignment checking. ”h]”(hŒterm”“”)”}”(hŒMisaligned READ:”h]”hŒMisaligned READ:”…””}”(hj—h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j•h³hÇh´Kzhj‘ubhŒ definition”“”)”}”(hhh]”hï)”}”(hŒÙIf NFSD_IO_DIRECT is used, expand any misaligned READ to the next DIO-aligned block (on either end of the READ). The expanded READ is verified to have proper offset/len (logical_block_size) and dma_alignment checking.”h]”hŒÙIf NFSD_IO_DIRECT is used, expand any misaligned READ to the next DIO-aligned block (on either end of the READ). The expanded READ is verified to have proper offset/len (logical_block_size) and dma_alignment checking.”…””}”(hjªh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kwhj§ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj‘ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´KzhjŒubj)”}”(hXáMisaligned WRITE: If NFSD_IO_DIRECT is used, split any misaligned WRITE into a start, middle and end as needed. The large middle segment is DIO-aligned and the start and/or end are misaligned. Buffered IO is used for the misaligned segments and O_DIRECT is used for the middle DIO-aligned segment. DONTCACHE buffered IO is _not_ used for the misaligned segments because using normal buffered IO offers significant RMW performance benefit when handling streaming misaligned WRITEs. ”h]”(j–)”}”(hŒMisaligned WRITE:”h]”hŒMisaligned WRITE:”…””}”(hjÈh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j•h³hÇh´KƒhjÄubj¦)”}”(hhh]”hï)”}”(hXÎIf NFSD_IO_DIRECT is used, split any misaligned WRITE into a start, middle and end as needed. The large middle segment is DIO-aligned and the start and/or end are misaligned. Buffered IO is used for the misaligned segments and O_DIRECT is used for the middle DIO-aligned segment. DONTCACHE buffered IO is _not_ used for the misaligned segments because using normal buffered IO offers significant RMW performance benefit when handling streaming misaligned WRITEs.”h]”hXÎIf NFSD_IO_DIRECT is used, split any misaligned WRITE into a start, middle and end as needed. The large middle segment is DIO-aligned and the start and/or end are misaligned. Buffered IO is used for the misaligned segments and O_DIRECT is used for the middle DIO-aligned segment. DONTCACHE buffered IO is _not_ used for the misaligned segments because using normal buffered IO offers significant RMW performance benefit when handling streaming misaligned WRITEs.”…””}”(hjÙh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K}hjÖubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjÄubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´KƒhjŒh²hubj)”}”(hX¯Tracing: The nfsd_read_direct trace event shows how NFSD expands any misaligned READ to the next DIO-aligned block (on either end of the original READ, as needed). This combination of trace events is useful for READs:: echo 1 > /sys/kernel/tracing/events/nfsd/nfsd_read_vector/enable echo 1 > /sys/kernel/tracing/events/nfsd/nfsd_read_direct/enable echo 1 > /sys/kernel/tracing/events/nfsd/nfsd_read_io_done/enable echo 1 > /sys/kernel/tracing/events/xfs/xfs_file_direct_read/enable The nfsd_write_direct trace event shows how NFSD splits a given misaligned WRITE into a DIO-aligned middle segment. This combination of trace events is useful for WRITEs:: echo 1 > /sys/kernel/tracing/events/nfsd/nfsd_write_opened/enable echo 1 > /sys/kernel/tracing/events/nfsd/nfsd_write_direct/enable echo 1 > /sys/kernel/tracing/events/nfsd/nfsd_write_io_done/enable echo 1 > /sys/kernel/tracing/events/xfs/xfs_file_direct_write/enable”h]”(j–)”}”(hŒTracing:”h]”hŒTracing:”…””}”(hj÷h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j•h³hÇh´K˜hjóubj¦)”}”(hhh]”(hï)”}”(hŒšThe nfsd_read_direct trace event shows how NFSD expands any misaligned READ to the next DIO-aligned block (on either end of the original READ, as needed).”h]”hŒšThe nfsd_read_direct trace event shows how NFSD expands any misaligned READ to the next DIO-aligned block (on either end of the original READ, as needed).”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K†hjubhï)”}”(hŒ6This combination of trace events is useful for READs::”h]”hŒ5This combination of trace events is useful for READs:”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KŠhjubjÄ)”}”(hXecho 1 > /sys/kernel/tracing/events/nfsd/nfsd_read_vector/enable echo 1 > /sys/kernel/tracing/events/nfsd/nfsd_read_direct/enable echo 1 > /sys/kernel/tracing/events/nfsd/nfsd_read_io_done/enable echo 1 > /sys/kernel/tracing/events/xfs/xfs_file_direct_read/enable”h]”hXecho 1 > /sys/kernel/tracing/events/nfsd/nfsd_read_vector/enable echo 1 > /sys/kernel/tracing/events/nfsd/nfsd_read_direct/enable echo 1 > /sys/kernel/tracing/events/nfsd/nfsd_read_io_done/enable echo 1 > /sys/kernel/tracing/events/xfs/xfs_file_direct_read/enable”…””}”hj$sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jÃh³hÇh´KŒhjubhï)”}”(hŒsThe nfsd_write_direct trace event shows how NFSD splits a given misaligned WRITE into a DIO-aligned middle segment.”h]”hŒsThe nfsd_write_direct trace event shows how NFSD splits a given misaligned WRITE into a DIO-aligned middle segment.”…””}”(hj2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K‘hjubhï)”}”(hŒ7This combination of trace events is useful for WRITEs::”h]”hŒ6This combination of trace events is useful for WRITEs:”…””}”(hj@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K”hjubjÄ)”}”(hX echo 1 > /sys/kernel/tracing/events/nfsd/nfsd_write_opened/enable echo 1 > /sys/kernel/tracing/events/nfsd/nfsd_write_direct/enable echo 1 > /sys/kernel/tracing/events/nfsd/nfsd_write_io_done/enable echo 1 > /sys/kernel/tracing/events/xfs/xfs_file_direct_write/enable”h]”hX echo 1 > /sys/kernel/tracing/events/nfsd/nfsd_write_opened/enable echo 1 > /sys/kernel/tracing/events/nfsd/nfsd_write_direct/enable echo 1 > /sys/kernel/tracing/events/nfsd/nfsd_write_io_done/enable echo 1 > /sys/kernel/tracing/events/xfs/xfs_file_direct_write/enable”…””}”hjNsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jÃh³hÇh´K–hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjóubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K˜hjŒh²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1jŠhj¹h²hh³hÇh´Nubeh}”(h]”Œ nfsd-direct”ah ]”h"]”Œ nfsd direct”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KHubeh}”(h]”Œ nfsd-io-modes”ah ]”h"]”Œ nfsd io modes”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”}”Œnameids”}”(j{jxjjj¶j³jsjpuŒ nametypes”}”(j{‰j‰j¶‰js‰uh}”(jxhÊjhÝj³jjpj¹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”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.