€•V.Œ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”Œ3/translations/zh_CN/driver-api/cxl/linux/dax-driver”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/zh_TW/driver-api/cxl/linux/dax-driver”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/it_IT/driver-api/cxl/linux/dax-driver”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/ja_JP/driver-api/cxl/linux/dax-driver”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/ko_KR/driver-api/cxl/linux/dax-driver”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/pt_BR/driver-api/cxl/linux/dax-driver”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/sp_SP/driver-api/cxl/linux/dax-driver”Œ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³ŒM/var/lib/git/docbuild/linux/Documentation/driver-api/cxl/linux/dax-driver.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒDAX Driver Operation”h]”hŒDAX Driver Operation”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒ paragraph”“”)”}”(hŒßThe `Direct Access Device` driver was originally designed to provide a memory-like access mechanism to memory-like block-devices. It was extended to support CXL Memory Devices, which provide user-configured memory devices.”h]”(hŒThe ”…””}”(hhßh²hh³Nh´NubhŒtitle_reference”“”)”}”(hŒ`Direct Access Device`”h]”hŒDirect Access Device”…””}”(hhéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhhßubhŒÅ driver was originally designed to provide a memory-like access mechanism to memory-like block-devices. It was extended to support CXL Memory Devices, which provide user-configured memory devices.”…””}”(hhßh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÞ)”}”(hŒ9The CXL subsystem depends on the DAX subsystem to either:”h]”hŒ9The CXL subsystem depends on the DAX subsystem to either:”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K hhÊh²hubhŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒFGenerate a file-like interface to userland via :code:`/dev/daxN.Y`, or”h]”hÞ)”}”(hjh]”(hŒ/Generate a file-like interface to userland via ”…””}”(hjh²hh³Nh´NubhŒliteral”“”)”}”(hŒ:code:`/dev/daxN.Y`”h]”hŒ /dev/daxN.Y”…””}”(hj#h²hh³Nh´Nubah}”(h]”h ]”Œcode”ah"]”h$]”h&]”Œlanguage”huh1j!hjubhŒ, or”…””}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubj)”}”(hŒIEngage the memory-hotplug interface to add CXL memory to page allocator. ”h]”hÞ)”}”(hŒHEngage the memory-hotplug interface to add CXL memory to page allocator.”h]”hŒHEngage the memory-hotplug interface to add CXL memory to page allocator.”…””}”(hjGh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhjCubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1jh³hÇh´K hhÊh²hubhÞ)”}”(hŒ¥The DAX subsystem exposes this ability through the `cxl_dax_region` driver. A `dax_region` provides the translation between a CXL `memory_region` and a `DAX Device`.”h]”(hŒ3The DAX subsystem exposes this ability through the ”…””}”(hjch²hh³Nh´Nubhè)”}”(hŒ`cxl_dax_region`”h]”hŒcxl_dax_region”…””}”(hjkh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhjcubhŒ driver. A ”…””}”(hjch²hh³Nh´Nubhè)”}”(hŒ `dax_region`”h]”hŒ dax_region”…””}”(hj}h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhjcubhŒ( provides the translation between a CXL ”…””}”(hjch²hh³Nh´Nubhè)”}”(hŒ`memory_region`”h]”hŒ memory_region”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhjcubhŒ and a ”…””}”(hjch²hh³Nh´Nubhè)”}”(hŒ `DAX Device`”h]”hŒ DAX Device”…””}”(hj¡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhjcubhŒ.”…””}”(hjch²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÉ)”}”(hhh]”(hÎ)”}”(hŒ DAX Device”h]”hŒ DAX Device”…””}”(hj¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj¹h²hh³hÇh´KubhÞ)”}”(hXA `DAX Device` is a file-like interface exposed in :code:`/dev/daxN.Y`. A memory region exposed via dax device can be accessed via userland software via the :code:`mmap()` system-call. The result is direct mappings to the CXL capacity in the task's page tables.”h]”(hŒA ”…””}”(hjÊh²hh³Nh´Nubhè)”}”(hŒ `DAX Device`”h]”hŒ DAX Device”…””}”(hjÒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhjÊubhŒ% is a file-like interface exposed in ”…””}”(hjÊh²hh³Nh´Nubj")”}”(hŒ:code:`/dev/daxN.Y`”h]”hŒ /dev/daxN.Y”…””}”(hjäh²hh³Nh´Nubah}”(h]”h ]”j.ah"]”h$]”h&]”Œlanguage”huh1j!hjÊubhŒW. A memory region exposed via dax device can be accessed via userland software via the ”…””}”(hjÊh²hh³Nh´Nubj")”}”(hŒ:code:`mmap()`”h]”hŒmmap()”…””}”(hj÷h²hh³Nh´Nubah}”(h]”h ]”j.ah"]”h$]”h&]”Œlanguage”huh1j!hjÊubhŒ] system-call. The result is direct mappings to the CXL capacity in the task’s page tables.”…””}”(hjÊh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj¹h²hubhÞ)”}”(hŒTUsers wishing to manually handle allocation of CXL memory should use this interface.”h]”hŒTUsers wishing to manually handle allocation of CXL memory should use this interface.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj¹h²hubeh}”(h]”Œ dax-device”ah ]”h"]”Œ dax device”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒkmem conversion”h]”hŒkmem conversion”…””}”(hj)h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj&h²hh³hÇh´KubhÞ)”}”(hŒæThe :code:`dax_kmem` driver converts a `DAX Device` into a series of `hotplug memory blocks` managed by :code:`kernel/memory-hotplug.c`. This capacity will be exposed to the kernel page allocator in the user-selected memory zone.”h]”(hŒThe ”…””}”(hj7h²hh³Nh´Nubj")”}”(hŒ:code:`dax_kmem`”h]”hŒdax_kmem”…””}”(hj?h²hh³Nh´Nubah}”(h]”h ]”j.ah"]”h$]”h&]”Œlanguage”huh1j!hj7ubhŒ driver converts a ”…””}”(hj7h²hh³Nh´Nubhè)”}”(hŒ `DAX Device`”h]”hŒ DAX Device”…””}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhj7ubhŒ into a series of ”…””}”(hj7h²hh³Nh´Nubhè)”}”(hŒ`hotplug memory blocks`”h]”hŒhotplug memory blocks”…””}”(hjdh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhj7ubhŒ managed by ”…””}”(hj7h²hh³Nh´Nubj")”}”(hŒ:code:`kernel/memory-hotplug.c`”h]”hŒkernel/memory-hotplug.c”…””}”(hjvh²hh³Nh´Nubah}”(h]”h ]”j.ah"]”h$]”h&]”Œlanguage”huh1j!hj7ubhŒ_. This capacity will be exposed to the kernel page allocator in the user-selected memory zone.”…””}”(hj7h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K hj&h²hubhÞ)”}”(hXêThe :code:`memmap_on_memory` setting (both global and DAX device local) dictates where the kernell will allocate the :code:`struct folio` descriptors for this memory will come from. If :code:`memmap_on_memory` is set, memory hotplug will set aside a portion of the memory block capacity to allocate folios. If unset, the memory is allocated via a normal :code:`GFP_KERNEL` allocation - and as a result will most likely land on the local NUM node of the CPU executing the hotplug operation.”h]”(hŒThe ”…””}”(hjh²hh³Nh´Nubj")”}”(hŒ:code:`memmap_on_memory`”h]”hŒmemmap_on_memory”…””}”(hj—h²hh³Nh´Nubah}”(h]”h ]”j.ah"]”h$]”h&]”Œlanguage”huh1j!hjubhŒY setting (both global and DAX device local) dictates where the kernell will allocate the ”…””}”(hjh²hh³Nh´Nubj")”}”(hŒ:code:`struct folio`”h]”hŒ struct folio”…””}”(hjªh²hh³Nh´Nubah}”(h]”h ]”j.ah"]”h$]”h&]”Œlanguage”huh1j!hjubhŒ1 descriptors for this memory will come from. If ”…””}”(hjh²hh³Nh´Nubj")”}”(hŒ:code:`memmap_on_memory`”h]”hŒmemmap_on_memory”…””}”(hj½h²hh³Nh´Nubah}”(h]”h ]”j.ah"]”h$]”h&]”Œlanguage”huh1j!hjubhŒ‘ is set, memory hotplug will set aside a portion of the memory block capacity to allocate folios. If unset, the memory is allocated via a normal ”…””}”(hjh²hh³Nh´Nubj")”}”(hŒ:code:`GFP_KERNEL`”h]”hŒ GFP_KERNEL”…””}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”j.ah"]”h$]”h&]”Œlanguage”huh1j!hjubhŒu allocation - and as a result will most likely land on the local NUM node of the CPU executing the hotplug operation.”…””}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K%hj&h²hubeh}”(h]”Œkmem-conversion”ah ]”h"]”Œkmem conversion”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´Kubeh}”(h]”Œdax-driver-operation”ah ]”h"]”Œdax driver operation”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 jîjëuŒ nametypes”}”(jö‰j#‰jî‰uh}”(jóhÊ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”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.