€•µ-Œ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”Œ5/translations/zh_CN/driver-api/cxl/allocation/reclaim”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ5/translations/zh_TW/driver-api/cxl/allocation/reclaim”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ5/translations/it_IT/driver-api/cxl/allocation/reclaim”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ5/translations/ja_JP/driver-api/cxl/allocation/reclaim”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ5/translations/ko_KR/driver-api/cxl/allocation/reclaim”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ5/translations/pt_BR/driver-api/cxl/allocation/reclaim”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ5/translations/sp_SP/driver-api/cxl/allocation/reclaim”Œ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³ŒO/var/lib/git/docbuild/linux/Documentation/driver-api/cxl/allocation/reclaim.rst”h´KubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒReclaim”h]”hŒReclaim”…”�”}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒ paragraph”“”)�”}”(hŒåAnother way CXL memory can be utilized *indirectly* is via the reclaim system in :code:`mm/vmscan.c`. Reclaim is engaged when memory capacity on the system becomes pressured based on global and cgroup-local `watermark` settings.”h]”(hŒ'Another way CXL memory can be utilized ”…”�”}”(hhßh²hh³Nh´NubhŒemphasis”“”)�”}”(hŒ *indirectly*”h]”hŒ indirectly”…”�”}”(hhéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhhßubhŒ is via the reclaim system in ”…”�”}”(hhßh²hh³Nh´NubhŒliteral”“”)�”}”(hŒ:code:`mm/vmscan.c`”h]”hŒ mm/vmscan.c”…”�”}”(hhýh²hh³Nh´Nubah}”(h]”h ]”Œcode”ah"]”h$]”h&]”Œlanguage”huh1hûhhßubhŒl. Reclaim is engaged when memory capacity on the system becomes pressured based on global and cgroup-local ”…”�”}”(hhßh²hh³Nh´NubhŒtitle_reference”“”)�”}”(hŒ `watermark`”h]”hŒ watermark”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhhßubhŒ settings.”…”�”}”(hhßh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÞ)�”}”(hŒ‰In this section we won't discuss the `watermark` configurations, just how CXL memory can be consumed by various pieces of reclaim system.”h]”(hŒ'In this section we won’t discuss the ”…”�”}”(hj+h²hh³Nh´Nubj)�”}”(hŒ `watermark`”h]”hŒ watermark”…”�”}”(hj3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj+ubhŒY configurations, just how CXL memory can be consumed by various pieces of reclaim system.”…”�”}”(hj+h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K hhÊh²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒDemotion”h]”hŒDemotion”…”�”}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjKh²hh³hÇh´KubhÞ)�”}”(hŒñBy default, the reclaim system will prefer swap (or zswap) when reclaiming memory. Enabling :code:`kernel/mm/numa/demotion_enabled` will cause vmscan to opportunistically prefer distant NUMA nodes to swap or zswap, if capacity is available.”h]”(hŒ]By default, the reclaim system will prefer swap (or zswap) when reclaiming memory. Enabling ”…”�”}”(hj\h²hh³Nh´Nubhü)�”}”(hŒ':code:`kernel/mm/numa/demotion_enabled`”h]”hŒkernel/mm/numa/demotion_enabled”…”�”}”(hjdh²hh³Nh´Nubah}”(h]”h ]”jah"]”h$]”h&]”Œlanguage”huh1hûhj\ubhŒm will cause vmscan to opportunistically prefer distant NUMA nodes to swap or zswap, if capacity is available.”…”�”}”(hj\h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhjKh²hubhÞ)�”}”(hŒ³Demotion engages the :code:`mm/memory_tier.c` component to determine the next demotion node. The next demotion node is based on the :code:`HMAT` or :code:`CDAT` performance data.”h]”(hŒDemotion engages the ”…”�”}”(hj}h²hh³Nh´Nubhü)�”}”(hŒ:code:`mm/memory_tier.c`”h]”hŒmm/memory_tier.c”…”�”}”(hj…h²hh³Nh´Nubah}”(h]”h ]”jah"]”h$]”h&]”Œlanguage”huh1hûhj}ubhŒX component to determine the next demotion node. The next demotion node is based on the ”…”�”}”(hj}h²hh³Nh´Nubhü)�”}”(hŒ :code:`HMAT`”h]”hŒHMAT”…”�”}”(hj˜h²hh³Nh´Nubah}”(h]”h ]”jah"]”h$]”h&]”Œlanguage”huh1hûhj}ubhŒ or ”…”�”}”(hj}h²hh³Nh´Nubhü)�”}”(hŒ :code:`CDAT`”h]”hŒCDAT”…”�”}”(hj«h²hh³Nh´Nubah}”(h]”h ]”jah"]”h$]”h&]”Œlanguage”huh1hûhj}ubhŒ performance data.”…”�”}”(hj}h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhjKh²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒcpusets.mems_allowed quirk”h]”hŒcpusets.mems_allowed quirk”…”�”}”(hjÇh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÄh²hh³hÇh´KubhÞ)�”}”(hŒêIn Linux v6.15 and below, demotion does not respect :code:`cpusets.mems_allowed` when migrating pages. As a result, if demotion is enabled, vmscan cannot guarantee isolation of a container's memory from nodes not set in mems_allowed.”h]”(hŒ4In Linux v6.15 and below, demotion does not respect ”…”�”}”(hjÕh²hh³Nh´Nubhü)�”}”(hŒ:code:`cpusets.mems_allowed`”h]”hŒcpusets.mems_allowed”…”�”}”(hjÝh²hh³Nh´Nubah}”(h]”h ]”jah"]”h$]”h&]”Œlanguage”huh1hûhjÕubhŒœ when migrating pages. As a result, if demotion is enabled, vmscan cannot guarantee isolation of a container’s memory from nodes not set in mems_allowed.”…”�”}”(hjÕh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhjÄh²hubhÞ)�”}”(hXMIn Linux v6.XX and up, demotion does attempt to respect :code:`cpusets.mems_allowed`; however, certain classes of shared memory originally instantiated by another cgroup (such as common libraries - e.g. libc) may still be demoted. As a result, the mems_allowed interface still cannot provide perfect isolation from the remote nodes.”h]”(hŒ8In Linux v6.XX and up, demotion does attempt to respect ”…”�”}”(hjöh²hh³Nh´Nubhü)�”}”(hŒ:code:`cpusets.mems_allowed`”h]”hŒcpusets.mems_allowed”…”�”}”(hjþh²hh³Nh´Nubah}”(h]”h ]”jah"]”h$]”h&]”Œlanguage”huh1hûhjöubhŒù; however, certain classes of shared memory originally instantiated by another cgroup (such as common libraries - e.g. libc) may still be demoted. As a result, the mems_allowed interface still cannot provide perfect isolation from the remote nodes.”…”�”}”(hjöh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhjÄh²hubeh}”(h]”Œcpusets-mems-allowed-quirk”ah ]”h"]”Œcpusets.mems_allowed quirk”ah$]”h&]”uh1hÈhjKh²hh³hÇh´Kubeh}”(h]”Œdemotion”ah ]”h"]”Œdemotion”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒZSwap and Node Preference”h]”hŒZSwap and Node Preference”…”�”}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj'h²hh³hÇh´K%ubhÞ)�”}”(hX In Linux v6.15 and below, ZSwap allocates memory from the local node of the processor for the new pages being compressed. Since pages being compressed are typically cold, the result is a cold page becomes promoted - only to be later demoted as it ages off the LRU.”h]”hX In Linux v6.15 and below, ZSwap allocates memory from the local node of the processor for the new pages being compressed. Since pages being compressed are typically cold, the result is a cold page becomes promoted - only to be later demoted as it ages off the LRU.”…”�”}”(hj8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K&hj'h²hubhÞ)�”}”(hŒ�In Linux v6.XX, ZSwap tries to prefer the node of the page being compressed as the allocation target for the compression page. This helps prevent thrashing.”h]”hŒ�In Linux v6.XX, ZSwap tries to prefer the node of the page being compressed as the allocation target for the compression page. This helps prevent thrashing.”…”�”}”(hjFh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K+hj'h²hubeh}”(h]”Œzswap-and-node-preference”ah ]”h"]”Œzswap and node preference”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K%ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒDemotion with ZSwap”h]”hŒDemotion with ZSwap”…”�”}”(hj_h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj\h²hh³hÇh´K0ubhÞ)�”}”(hŒ§When enabling both Demotion and ZSwap, you create a situation where ZSwap will prefer the slowest form of CXL memory by default until that tier of memory is exhausted.”h]”hŒ§When enabling both Demotion and ZSwap, you create a situation where ZSwap will prefer the slowest form of CXL memory by default until that tier of memory is exhausted.”…”�”}”(hjmh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K1hj\h²hubeh}”(h]”Œdemotion-with-zswap”ah ]”h"]”Œdemotion with zswap”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K0ubeh}”(h]”Œreclaim”ah ]”h"]”Œreclaim”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ˆj…j$j!jjjYjVj€j}uŒ nametypes”}”(jˆ‰j$‰j‰jY‰j€‰uh}”(j…hÊj!jKjjÄjVj'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”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.