[PATCH v2 00/13] drm/xe/pf: Improve EQ/PT provisioning

Michal Wajdeczko
2026-04-02T19:18:08Z

Since some time [1] we allow to change scheduling configurations of
the PF and VFs, what can be done before or after the VFs are enabled.

But while default EQ/PT values give the most flexibility, they don't
protect the PF or other VFs from one VF that could constantly submit
workloads without any gaps that would let GuC do a VF-switch.

To avoid forcing careless users to use sysfs prior to the experiments,
perform some auto-provisioning and preset PF and VFs EQ/PT to 16ms,
which should be fine for most simple usecases.

But before doing that, fix some minor corner cases that could impact
EQ/PT provisioning.

[1] https://gitlab.freedesktop.org/drm/xe/kernel/-/commit/3f984d706d6b

v1: https://patchwork.freedesktop.org/series/164119/#rev1
v2:
add explicit lockdep_assert_held (Piotr)
don't miss to check last VF sched-provisioning (Michal)
and explicitly check sched_if_idle mode (Michal)

Michal Wajdeczko (13):
drm/xe/guc: Update POLICY_SCHED_IF_IDLE documentation
drm/xe/pf: Fix pf_get_sched_priority() function signature
drm/xe/pf: Force new VFs prorities only once
drm/xe/pf: Print applied policy KLVs
drm/xe/pf: Reprovision policy settings after GT reset
drm/xe/pf: Don't reprovision policies if already default
drm/xe/pf: Encode scheduling priority KLV if needed
drm/xe/pf: Check EQ/PT/PRIO when testing VF config
drm/xe/pf: Allow to change sched_if_idle policy under lock
drm/xe/pf: Reprovision scheduling to default when no VFs
drm/xe/pf: Extract helper to show which VFs are provisioned
drm/xe/pf: Extract helpers for bulk EQ/PT provisioning
drm/xe/pf: Perform fair scheduling auto-provisioning

drivers/gpu/drm/xe/abi/guc_klvs_abi.h | 7 +
drivers/gpu/drm/xe/xe_gt_sriov_pf.c | 1 +
drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 262 ++++++++++++++++++---
drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h | 2 +
drivers/gpu/drm/xe/xe_gt_sriov_pf_policy.c | 122 ++++++----
drivers/gpu/drm/xe/xe_gt_sriov_pf_policy.h | 4 +-
drivers/gpu/drm/xe/xe_pci_sriov.c | 2 +
drivers/gpu/drm/xe/xe_sriov_pf_provision.c | 41 ++++
drivers/gpu/drm/xe/xe_sriov_pf_provision.h | 1 +
9 files changed, 362 insertions(+), 80 deletions(-)

--
2.47.1