Order SR-IOV scheduling provisioning safely
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 6 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | tests/intel/xe_sriov_scheduling: Disable VFs before resetting sched paramstests/ | +3 | 1 reply | |
| 2/6 | lib/xe/xe_sriov_admin: Rename restore defaults helperslib/ lib/ tests/ +2 more | +24 | 1 reply | |
| 3/6 | lib/xe/xe_sriov_admin: Lower priority before clearing timeslicinglib/ | +20 | 1 reply | |
| 4/6 | lib/xe/xe_sriov_admin: Add bulk scheduling params setterlib/ lib/ | +73 | 1 reply | |
| 5/6 | tests/intel/xe_sriov_scheduling: Use safe scheduling params helperstests/ | +23 | 1 reply | |
| 6/6 | tests/intel/xe_pmu: Disable VFs before restoring sched paramstests/ | +1 | 1 reply |
Reviews trailers per patch
All 6 patches have a Reviewed-by or Acked-by.
| Patch | Lukasz Laguna |
|---|---|
| 1/6 | R-b |
| 2/6 | R-b |
| 3/6 | R-b |
| 4/6 | R-b |
| 5/6 | R-b |
| 6/6 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH i-g-t 0/6] Order SR-IOV scheduling provisioning safely
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.
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(-)
Signature · 1 line
2.43.0