From: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>,
Adam Miszczak <adam.miszczak@linux.intel.com>,
Jakub Kolakowski <jakub1.kolakowski@intel.com>,
Lukasz Laguna <lukasz.laguna@intel.com>,
Michal Wajdeczko <michal.wajdeczko@intel.com>
Subject: [PATCH i-g-t 0/6] Order SR-IOV scheduling provisioning safely
Date: Tue, 18 Aug 2026 14:39:24 +0200 [thread overview]
Message-ID: <cover.1787056235.git.marcin.bernatowicz@linux.intel.com> (raw)
Provisioning execution quantum, preemption timeout and scheduling priority is
not order independent. Zero execution quantum and zero preemption timeout both
mean infinity, and a function left at a priority above LOW with infinite
timeslicing may never be switched away from by GuC. That is a risky state which
can be left via PAUSE/FLR, so the safe sequences are:
setup: exec_quantum, preempt_timeout, sched_priority
cleanup: sched_priority (LOW), exec_quantum (0), preempt_timeout (0)
The restore helpers in lib did the opposite on cleanup, clearing timeslicing
first and dropping priority last. That transits through the risky state
whenever a test raised priority, and is reachable from xe_pmu, which restores
defaults while VFs are still enabled, and from the SR-IOV exit handler on abort
or signal.
Scheduling parameters should also only be reset once VFs are disabled, since
resetting them while VFs are still active can leave cleanup incomplete and make
subsequent VF probing fail.
Patch 1 was posted standalone before and is included here because the rest of
the series builds on it. Patch 2 renames the restore helpers to say scheduling
defaults, since they never touched resource provisioning. Patch 3 is the
ordering fix itself and stands on its own. Patch 4 adds a bulk setter enforcing
the setup order and rejecting infinite timeslicing, so the invalid combination
is unrepresentable rather than merely avoided by convention. Patches 5 and 6
move the tests over, and align xe_pmu cleanup with xe_sriov_scheduling.
Assisted-by: Copilot:Claude-Opus-5
Cc: Adam Miszczak <adam.miszczak@linux.intel.com>
Cc: Jakub Kolakowski <jakub1.kolakowski@intel.com>
Cc: Lukasz Laguna <lukasz.laguna@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Marcin Bernatowicz (6):
tests/intel/xe_sriov_scheduling: Disable VFs before resetting sched
params
lib/xe/xe_sriov_admin: Rename restore defaults helpers
lib/xe/xe_sriov_admin: Lower priority before clearing timeslicing
lib/xe/xe_sriov_admin: Add bulk scheduling params setter
tests/intel/xe_sriov_scheduling: Use safe scheduling params helpers
tests/intel/xe_pmu: Disable VFs before restoring sched params
lib/xe/xe_sriov_admin.c | 111 +++++++++++++++++++++++-------
lib/xe/xe_sriov_admin.h | 32 +++++++--
tests/intel/xe_pmu.c | 4 +-
tests/intel/xe_sriov_admin.c | 4 +-
tests/intel/xe_sriov_scheduling.c | 88 +++++++----------------
5 files changed, 140 insertions(+), 99 deletions(-)
--
2.43.0
next reply other threads:[~2026-08-18 12:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 12:39 Marcin Bernatowicz [this message]
2026-08-18 12:39 ` [PATCH i-g-t 1/6] tests/intel/xe_sriov_scheduling: Disable VFs before resetting sched params Marcin Bernatowicz
2026-08-18 14:14 ` Laguna, Lukasz
2026-08-18 12:39 ` [PATCH i-g-t 2/6] lib/xe/xe_sriov_admin: Rename restore defaults helpers Marcin Bernatowicz
2026-08-18 14:14 ` Laguna, Lukasz
2026-08-18 12:39 ` [PATCH i-g-t 3/6] lib/xe/xe_sriov_admin: Lower priority before clearing timeslicing Marcin Bernatowicz
2026-08-18 14:15 ` Laguna, Lukasz
2026-08-18 12:39 ` [PATCH i-g-t 4/6] lib/xe/xe_sriov_admin: Add bulk scheduling params setter Marcin Bernatowicz
2026-08-18 14:15 ` Laguna, Lukasz
2026-08-18 12:39 ` [PATCH i-g-t 5/6] tests/intel/xe_sriov_scheduling: Use safe scheduling params helpers Marcin Bernatowicz
2026-08-18 14:15 ` Laguna, Lukasz
2026-08-18 12:39 ` [PATCH i-g-t 6/6] tests/intel/xe_pmu: Disable VFs before restoring sched params Marcin Bernatowicz
2026-08-18 14:16 ` Laguna, Lukasz
2026-08-18 14:11 ` ✓ Xe.CI.BAT: success for Order SR-IOV scheduling provisioning safely Patchwork
2026-08-18 14:20 ` ✓ i915.CI.BAT: " Patchwork
2026-08-18 16:39 ` ✓ Xe.CI.FULL: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1787056235.git.marcin.bernatowicz@linux.intel.com \
--to=marcin.bernatowicz@linux.intel.com \
--cc=adam.miszczak@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jakub1.kolakowski@intel.com \
--cc=lukasz.laguna@intel.com \
--cc=michal.wajdeczko@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.