STRUCT KFD_IOCTL_SET_XNACK_MODE_ARGS(9)
π struct kfd_ioctl_set_xnack_mode_args(9) π
okay so bestie, welcome to the Kernel API Manual, section 9 β this is the page for struct kfd_ioctl_set_xnack_mode_args, and it's basically the remote control for XNACK mode. tiny struct, big consequences, let's get into it π
β¨ NAME β¨
struct kfd_ioctl_set_xnack_mode_args β literally just the arguments for set_xnack_mode. that's it. that's the whole name. iconic minimalism π«Ά
πΈ SYNOPSIS πΈ
struct kfd_ioctl_set_xnack_mode_args {
__s32 xnack_enabled;
};
not me showing you the entire struct in one breath π it's genuinely just the one member, we love a low-effort icon β¨
π¦ Members π¦
xnack_enabledβ an[in/out]field, bestie, meaning it goes in and comes back out: whether to enable XNACK mode for this process π
π Description π
so xnack_enabled tells you whether recoverable page faults should be enabled for the current process. the rules are:
0means disabled π- positive means enabled β¨
- negative means leave unchanged β like, don't touch it, hands off, she's fine π«Ά
if it's enabled, virtual address translations on GFXv9 and later AMD GPUs can return XNACK and retry the access until a valid PTE is available. and that, bestie, is how device page faults get implemented π§
on output, xnack_enabled returns the (new) current mode β so 0 or positive. which means: a negative input value is literally the hack to query the current mode without changing it. read-only mode, spy mode, no-touchy mode π₯ iykyk
real talk though, the XNACK mode fundamentally changes the way SVM managed memory works in the driver, with subtle effects on application performance and functionality. subtle. like, "you won't notice until you definitely notice" subtle π
enabling XNACK mode requires shader programs to be compiled differently. and not all GPUs support changing the mode per-process. sooooo, changing the mode is only allowed while no user mode queues exist in the process. that's the vibe check that makes sure no shader code is running that may be compiled for the wrong mode π
and GPUs that cannot change to the requested mode will prevent the XNACK mode from occurring. no cap. also: all GPUs used by the process must be in the same XNACK mode. everyone matching outfits or nobody goes out π
last thing β GFXv8 or older GPUs do not support 48 bit virtual addresses or SVM. therefore those GPUs are not considered for the XNACK mode switch. sorry bestie, not invited to the party π
β Return β
0on success π-errnoon failure π
π SEE ALSO π
go read these next, bestie, they're all in the same fam:
- Kernel file
./include/uapi/linux/kfd_ioctl.hstructkfd_ioctl_criu_args(9) enum kfd_ioctl_svm_op(9)enum kfd_ioctl_svm_attr_type(9)struct kfd_ioctl_svm_attribute(9)struct kfd_ioctl_svm_args(9)struct kfd_ioctl_runtime_enable_args(9)struct kfd_ioctl_dbg_trap_enable_args(9)struct kfd_ioctl_dbg_trap_send_runtime_event_args(9)struct kfd_ioctl_dbg_trap_set_exceptions_enabled_args(9)struct kfd_ioctl_dbg_trap_set_wave_launch_override_args(9)struct kfd_ioctl_dbg_trap_set_wave_launch_mode_args(9)struct kfd_ioctl_dbg_trap_suspend_queues_args(9)struct kfd_ioctl_dbg_trap_resume_queues_args(9)struct kfd_ioctl_dbg_trap_set_node_address_watch_args(9)struct kfd_ioctl_dbg_trap_clear_node_address_watch_args(9)struct kfd_ioctl_dbg_trap_set_flags_args(9)struct kfd_ioctl_dbg_trap_query_debug_event_args(9)struct kfd_ioctl_dbg_trap_query_exception_info_args(9)struct kfd_ioctl_dbg_trap_queue_snapshot_args(9)struct kfd_ioctl_dbg_trap_device_snapshot_args(9)struct kfd_ioctl_dbg_trap_args(9)struct kfd_ioctl_pmc_settings(9)
and that's the whole page, bestie, you ate that π this lil drop came from ./include/uapi/linux and it's dated October 2026 β mwah, slay, go enable some page faults responsibly πΈβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms