€•k-Œ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Œ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:”…””}”(hhíhž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”…””}”(hjhž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&]”uh1jhhýhž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.”…””}”(hj3hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khj/ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhhýhžhhŸh³h Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1hûhŸ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 ”…””}”(hjOhžhhŸNh NubhÔ)”}”(hŒ`cxl_dax_region`”h]”hŒcxl_dax_region”…””}”(hjWhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÓhjOubhŒ driver. A ”…””}”(hjOhžhhŸNh NubhÔ)”}”(hŒ `dax_region`”h]”hŒ dax_region”…””}”(hjihžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÓhjOubhŒ( provides the translation between a CXL ”…””}”(hjOhžhhŸNh NubhÔ)”}”(hŒ`memory_region`”h]”hŒ memory_region”…””}”(hj{hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÓhjOubhŒ and a ”…””}”(hjOhžhhŸNh NubhÔ)”}”(hŒ `DAX Device`”h]”hŒ DAX Device”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÓhjOubhŒ.”…””}”(hjOhž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 ]”jah"]”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 ]”jah"]”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.”…””}”(hjühž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”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjhž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 ”…””}”(hj#hžhhŸNh Nubj)”}”(hŒ:code:`dax_kmem`”h]”hŒdax_kmem”…””}”(hj+hžhhŸNh Nubah}”(h]”h ]”jah"]”h$]”h&]”Œlanguage”huh1j hj#ubhŒ driver converts 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Œ into a series of ”…””}”(hj#hžhhŸNh NubhÔ)”}”(hŒ`hotplug memory blocks`”h]”hŒhotplug memory blocks”…””}”(hjPhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÓhj#ubhŒ managed by ”…””}”(hj#hžhhŸNh Nubj)”}”(hŒ:code:`kernel/memory-hotplug.c`”h]”hŒkernel/memory-hotplug.c”…””}”(hjbhžhhŸNh Nubah}”(h]”h ]”jah"]”h$]”h&]”Œlanguage”huh1j hj#ubhŒ_. This capacity will be exposed to the kernel page allocator in the user-selected memory zone.”…””}”(hj#hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K hjhž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 ”…””}”(hj{hžhhŸNh Nubj)”}”(hŒ:code:`memmap_on_memory`”h]”hŒmemmap_on_memory”…””}”(hjƒhžhhŸNh Nubah}”(h]”h ]”jah"]”h$]”h&]”Œlanguage”huh1j hj{ubhŒY setting (both global and DAX device local) dictates where the kernell will allocate the ”…””}”(hj{hžhhŸNh Nubj)”}”(hŒ:code:`struct folio`”h]”hŒ struct folio”…””}”(hj–hžhhŸNh Nubah}”(h]”h ]”jah"]”h$]”h&]”Œlanguage”huh1j hj{ubhŒ1 descriptors for this memory will come from. If ”…””}”(hj{hžhhŸNh Nubj)”}”(hŒ:code:`memmap_on_memory`”h]”hŒmemmap_on_memory”…””}”(hj©hžhhŸNh Nubah}”(h]”h ]”jah"]”h$]”h&]”Œlanguage”huh1j hj{ubhŒ‘ 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 ”…””}”(hj{hžhhŸNh Nubj)”}”(hŒ:code:`GFP_KERNEL`”h]”hŒ GFP_KERNEL”…””}”(hj¼hžhhŸNh Nubah}”(h]”h ]”jah"]”h$]”h&]”Œlanguage”huh1j hj{ubhŒu allocation - and as a result will most likely land on the local NUM node of the CPU executing the hotplug operation.”…””}”(hj{hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K%hjhž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ßjj jÚj×uŒ nametypes”}”(jâ‰j‰jÚ‰uh}”(jßh¶j j¥j×juŒ 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.