€•¼2Œ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”Œ0/translations/zh_CN/gpu/amdgpu/process-isolation”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ0/translations/zh_TW/gpu/amdgpu/process-isolation”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ0/translations/it_IT/gpu/amdgpu/process-isolation”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ0/translations/ja_JP/gpu/amdgpu/process-isolation”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ0/translations/ko_KR/gpu/amdgpu/process-isolation”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ0/translations/sp_SP/gpu/amdgpu/process-isolation”Œ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ŸŒJ/var/lib/git/docbuild/linux/Documentation/gpu/amdgpu/process-isolation.rst”h KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒAMDGPU Process Isolation”h]”hŒAMDGPU Process Isolation”…””}”(hh»hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hh¶hžhhŸh³h KubhŒ paragraph”“”)”}”(hXôThe AMDGPU driver includes a feature that enables automatic process isolation on the graphics engine. This feature serializes access to the graphics engine and adds a cleaner shader which clears the Local Data Store (LDS) and General Purpose Registers (GPRs) between jobs. All processes using the GPU, including both graphics and compute workloads, are serialized when this feature is enabled. On GPUs that support partitionable graphics engines, this feature can be enabled on a per-partition basis.”h]”hXôThe AMDGPU driver includes a feature that enables automatic process isolation on the graphics engine. This feature serializes access to the graphics engine and adds a cleaner shader which clears the Local Data Store (LDS) and General Purpose Registers (GPRs) between jobs. All processes using the GPU, including both graphics and compute workloads, are serialized when this feature is enabled. On GPUs that support partitionable graphics engines, this feature can be enabled on a per-partition basis.”…””}”(hhËhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khh¶hžhubhÊ)”}”(hŒýIn addition, there is an interface to manually run the cleaner shader when the use of the GPU is complete. This may be preferable in some use cases, such as a single-user system where the login manager triggers the cleaner shader when the user logs out.”h]”hŒýIn addition, there is an interface to manually run the cleaner shader when the use of the GPU is complete. This may be preferable in some use cases, such as a single-user system where the login manager triggers the cleaner shader when the user logs out.”…””}”(hhÙhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K hh¶hžhubhµ)”}”(hhh]”(hº)”}”(hŒProcess Isolation”h]”hŒProcess Isolation”…””}”(hhêhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hhçhžhhŸh³h K ubhÊ)”}”(hŒ­The `run_cleaner_shader` and `enforce_isolation` sysfs interfaces allow users to manually execute the cleaner shader and control the process isolation feature, respectively.”h]”(hŒThe ”…””}”(hhøhžhhŸNh NubhŒtitle_reference”“”)”}”(hŒ`run_cleaner_shader`”h]”hŒrun_cleaner_shader”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhhøubhŒ and ”…””}”(hhøhžhhŸNh Nubj)”}”(hŒ`enforce_isolation`”h]”hŒenforce_isolation”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhhøubhŒ} sysfs interfaces allow users to manually execute the cleaner shader and control the process isolation feature, respectively.”…””}”(hhøhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khhçhžhubhµ)”}”(hhh]”(hº)”}”(hŒPartition Handling”h]”hŒPartition Handling”…””}”(hj/hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hj,hžhhŸh³h KubhÊ)”}”(hXâThe `enforce_isolation` file in sysfs can be used to enable process isolation and automatic shader cleanup between processes. On GPUs that support graphics engine partitioning, this can be enabled per partition. The partition and its current setting (0 disabled, 1 enabled) can be read from sysfs. On GPUs that do not support graphics engine partitioning, only a single partition will be present. Writing 1 to the partition position enables enforce isolation, writing 0 disables it.”h]”(hŒThe ”…””}”(hj=hžhhŸNh Nubj)”}”(hŒ`enforce_isolation`”h]”hŒenforce_isolation”…””}”(hjEhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj=ubhXË file in sysfs can be used to enable process isolation and automatic shader cleanup between processes. On GPUs that support graphics engine partitioning, this can be enabled per partition. The partition and its current setting (0 disabled, 1 enabled) can be read from sysfs. On GPUs that do not support graphics engine partitioning, only a single partition will be present. Writing 1 to the partition position enables enforce isolation, writing 0 disables it.”…””}”(hj=hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khj,hžhubhÊ)”}”(hŒHExample of enabling enforce isolation on a GPU with multiple partitions:”h]”hŒHExample of enabling enforce isolation on a GPU with multiple partitions:”…””}”(hj]hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khj,hžhubhŒ literal_block”“”)”}”(hŒz$ echo 1 0 1 0 > /sys/class/drm/card0/device/enforce_isolation $ cat /sys/class/drm/card0/device/enforce_isolation 1 0 1 0”h]”hŒz$ echo 1 0 1 0 > /sys/class/drm/card0/device/enforce_isolation $ cat /sys/class/drm/card0/device/enforce_isolation 1 0 1 0”…””}”hjmsbah}”(h]”h ]”h"]”h$]”h&]”h±h²Œforce”‰Œlanguage”Œconsole”Œhighlight_args”}”uh1jkhŸh³h Khj,hžhubhÊ)”}”(hŒThe output indicates that enforce isolation is enabled on zeroth and second parition and disabled on first and fourth parition.”h]”hŒThe output indicates that enforce isolation is enabled on zeroth and second parition and disabled on first and fourth parition.”…””}”(hj€hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khj,hžhubhÊ)”}”(hŒlFor devices with a single partition or those that do not support partitions, there will be only one element:”h]”hŒlFor devices with a single partition or those that do not support partitions, there will be only one element:”…””}”(hjŽhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khj,hžhubjl)”}”(hŒn$ echo 1 > /sys/class/drm/card0/device/enforce_isolation $ cat /sys/class/drm/card0/device/enforce_isolation 1”h]”hŒn$ echo 1 > /sys/class/drm/card0/device/enforce_isolation $ cat /sys/class/drm/card0/device/enforce_isolation 1”…””}”hjœsbah}”(h]”h ]”h"]”h$]”h&]”h±h²j{‰j|Œconsole”j~}”uh1jkhŸh³h K!hj,hžhubeh}”(h]”Œpartition-handling”ah ]”h"]”Œpartition handling”ah$]”h&]”uh1h´hhçhžhhŸh³h Kubeh}”(h]”Œprocess-isolation”ah ]”h"]”Œprocess isolation”ah$]”h&]”uh1h´hh¶hžhhŸh³h K ubhµ)”}”(hhh]”(hº)”}”(hŒCleaner Shader Execution”h]”hŒCleaner Shader Execution”…””}”(hj¿hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hj¼hžhhŸh³h K(ubhÊ)”}”(hXThe driver can trigger a cleaner shader to clean up the LDS and GPR state on the graphics engine. When process isolation is enabled, this happens automatically between processes. In addition, there is a sysfs file to manually trigger cleaner shader execution.”h]”hXThe driver can trigger a cleaner shader to clean up the LDS and GPR state on the graphics engine. When process isolation is enabled, this happens automatically between processes. In addition, there is a sysfs file to manually trigger cleaner shader execution.”…””}”(hjÍhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K*hj¼hžhubhÊ)”}”(hŒjTo manually trigger the execution of the cleaner shader, write `0` to the `run_cleaner_shader` sysfs file:”h]”(hŒ?To manually trigger the execution of the cleaner shader, write ”…””}”(hjÛhžhhŸNh Nubj)”}”(hŒ`0`”h]”hŒ0”…””}”(hjãhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjÛubhŒ to the ”…””}”(hjÛhžhhŸNh Nubj)”}”(hŒ`run_cleaner_shader`”h]”hŒrun_cleaner_shader”…””}”(hjõhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjÛubhŒ sysfs file:”…””}”(hjÛhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K,hj¼hžhubjl)”}”(hŒ9$ echo 0 > /sys/class/drm/card0/device/run_cleaner_shader”h]”hŒ9$ echo 0 > /sys/class/drm/card0/device/run_cleaner_shader”…””}”hj sbah}”(h]”h ]”h"]”h$]”h&]”h±h²j{‰j|Œconsole”j~}”uh1jkhŸh³h K.hj¼hžhubhÊ)”}”(hŒdFor multi-partition devices, you can specify the partition index when triggering the cleaner shader:”h]”hŒdFor multi-partition devices, you can specify the partition index when triggering the cleaner shader:”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K2hj¼hžhubjl)”}”(hX$ echo 0 > /sys/class/drm/card0/device/run_cleaner_shader # For partition 0 $ echo 1 > /sys/class/drm/card0/device/run_cleaner_shader # For partition 1 $ echo 2 > /sys/class/drm/card0/device/run_cleaner_shader # For partition 2 # ... and so on for each partition”h]”hX$ echo 0 > /sys/class/drm/card0/device/run_cleaner_shader # For partition 0 $ echo 1 > /sys/class/drm/card0/device/run_cleaner_shader # For partition 1 $ echo 2 > /sys/class/drm/card0/device/run_cleaner_shader # For partition 2 # ... and so on for each partition”…””}”hj+sbah}”(h]”h ]”h"]”h$]”h&]”h±h²j{‰j|Œconsole”j~}”uh1jkhŸh³h K4hj¼hžhubhÊ)”}”(hŒuThis command initiates the cleaner shader, which will run and complete before any new tasks are scheduled on the GPU.”h]”hŒuThis command initiates the cleaner shader, which will run and complete before any new tasks are scheduled on the GPU.”…””}”(hj;hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K;hj¼hžhubeh}”(h]”Œcleaner-shader-execution”ah ]”h"]”Œcleaner shader execution”ah$]”h&]”uh1h´hh¶hžhhŸh³h K(ubeh}”(h]”Œamdgpu-process-isolation”ah ]”h"]”Œamdgpu process isolation”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”}”(jVjSj¹j¶j±j®jNjKuŒ nametypes”}”(jV‰j¹‰j±‰jN‰uh}”(jSh¶j¶hçj®j,jKj¼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.