]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe/pf: Allow change PF and VFs EQ/PT using sysfs
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Thu, 30 Oct 2025 22:23:36 +0000 (23:23 +0100)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Fri, 31 Oct 2025 19:01:37 +0000 (20:01 +0100)
commit3f984d706d6b584bdd78af1d35249b34ea179d5c
tree7ab576cfdfde1ae36ec2ba2516246975fb7ff548
parent83c02a7f4eca41d577ee547bef4245c19a766f7a
drm/xe/pf: Allow change PF and VFs EQ/PT using sysfs

On current platforms, in SR-IOV virtualization, the GPU is shared
between VFs on the time-slice basis. The 'execution quantum' (EQ)
and 'preemption timeout' (PT) are two main scheduling parameters
that could be set individually per each VF.

Add EQ/PT read-write attributes for the PF and all VFs.

By exposing those two parameters over sysfs, the admin can change
their default values (infinity) and let the GuC scheduler enforce
that settings.

 /sys/bus/pci/drivers/xe/BDF/
 ├── sriov_admin/
     ├── pf/
     │   └── profile
     │       ├── exec_quantum_ms [RW] unsigned integer
     │       └── preempt_timeout_us [RW] unsigned integer
     ├── vf1/
     │   └── profile
     │       ├── exec_quantum_ms [RW] unsigned integer
     │       └── preempt_timeout_us [RW] unsigned integer

Writing 0 to these files will set infinity EQ/PT for the VF on all
tiles/GTs. This is a default value. Writing non-zero integers to
these files will change EQ/PT to new value (in their respective
units: msec or usec).

Reading from these files will return EQ/PT as previously set on
all tiles/GTs. In case of inconsistent values detected, due to
errors or low-level configuration done using debugfs, -EUCLEAN
error will be returned.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patch.msgid.link/20251030222348.186658-6-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_sriov_pf_provision.c
drivers/gpu/drm/xe/xe_sriov_pf_provision.h
drivers/gpu/drm/xe/xe_sriov_pf_sysfs.c