Skip to content

PF: Add sriov_admin sysfs tree

Michal Wajdeczko intel-xe 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest17 patches 2 repliesIn review
  2. v217 patches 23 repliesSuperseded
  3. v114 patches 26 repliesSuperseded

Changes in v3 from the cover letter

fix typo, unify kernel-doc (Piotr)
add debug message about inconsistency (Piotr) small nit in emit_choice (Lucas)
fix patch title (Piotr)
some doc rewording (Lucas)

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17drm/xe/pf: Prepare sysfs for SR-IOV admin attributesdrivers/gpu/drm/xe/Makefile drivers/gpu/drm/xe/xe_sriov_pf.c drivers/gpu/drm/xe/xe_sriov_pf_sysfs.c +2 more+317 -00 replies
2/17drm/xe/pf: Take RPM during calls to SR-IOV attr.store()drivers/gpu/drm/xe/xe_sriov_pf_sysfs.c+14 -20 replies
3/17drm/xe/pf: Add _locked variants of the VF EQ config functionsdrivers/gpu/drm/xe/xe_gt_sriov_pf_config.c drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h+53 -170 replies
4/17drm/xe/pf: Add _locked variants of the VF PT config functionsdrivers/gpu/drm/xe/xe_gt_sriov_pf_config.c drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h+52 -170 replies
5/17drm/xe/pf: Allow change PF and VFs EQ/PT using sysfsdrivers/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+195 -20 replies
6/17drm/xe/pf: Relax report helper to accept PF in bulk configsdrivers/gpu/drm/xe/xe_gt_sriov_pf_config.c+8 -50 replies
7/17drm/xe/pf: Fix signature of internal config helpersdrivers/gpu/drm/xe/xe_gt_sriov_pf_config.c+2 -20 replies
8/17drm/xe/pf: Add functions to bulk configure EQ/PT on GTdrivers/gpu/drm/xe/xe_gt_sriov_pf_config.c drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h+58 -00 replies
9/17drm/xe/pf: Add functions to bulk provision EQ/PTdrivers/gpu/drm/xe/xe_sriov_pf_provision.c drivers/gpu/drm/xe/xe_sriov_pf_provision.h+58 -00 replies
10/17drm/xe/pf: Allow bulk change all VFs EQ/PT using sysfsdrivers/gpu/drm/xe/xe_sriov_pf_sysfs.c+36 -00 replies
11/17drm/xe/pf: Add functions to provision scheduling prioritydrivers/gpu/drm/xe/xe_sriov_pf_provision.c drivers/gpu/drm/xe/xe_sriov_pf_provision.h+97 -00 replies
12/17drm/xe/pf: Allow bulk change all VFs priority using sysfsdrivers/gpu/drm/xe/xe_sriov_pf_sysfs.c+41 -10 replies
13/17drm/xe/pf: Allow change PF scheduling priority using sysfsdrivers/gpu/drm/xe/xe_sriov_pf_sysfs.c+82 -20 replies
14/17drm/xe/pf: Promote xe_pci_sriov_get_vf_pdevdrivers/gpu/drm/xe/xe_pci_sriov.c drivers/gpu/drm/xe/xe_pci_sriov.h+24 -130 replies
15/17drm/xe/pf: Add sysfs device symlinks to enabled VFsdrivers/gpu/drm/xe/xe_pci_sriov.c drivers/gpu/drm/xe/xe_sriov_pf_sysfs.c drivers/gpu/drm/xe/xe_sriov_pf_sysfs.h+101 -00 replies
16/17drm/xe/pf: Allow to stop the VF using sysfsdrivers/gpu/drm/xe/xe_sriov_pf_sysfs.c+49 -00 replies
17/17drm/xe/pf: Add documentation for sriov_admin attributesDocumentation/ABI/testing/sysfs-driver-intel-xe-sriov+159 -01 reply

Reviews trailers per patch

All 17 patches have a Reviewed-by or Acked-by.

PatchRodrigo ViviLucas De MarchiPiotr Piórkowski
1/17A-b R-b
2/17R-b
3/17R-b
4/17R-b R-b
5/17A-b R-b R-b
6/17R-b
7/17R-b
8/17R-b R-b
9/17R-b
10/17A-b R-b
11/17R-b
12/17A-b R-b
13/17A-b R-b
14/17R-b
15/17A-b R-b
16/17R-b R-b
17/17R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH v3 00/17] PF: Add sriov_admin sysfs tree

To allow the admin to provision VFs using production quality vGPU profiles, we need to expose some of the SR-IOV knobs at the sysfs level as existing debugfs entries may not be available.

Start with some basic scheduling parameters and apply them to all tiles/GTs where VF can be running. Provisioning of the other hard resources (like GGTT, VRAM) is still fully done by the PF, which uses fair auto-provisioning, but soon we will try to expose that to the admin too (after this series).

Below is an example of the new sysfs attributes tree on the PF with 2 of 3 VFs enabled (VFs were limited by max_vfs config):

/sys/bus/pci/drivers/xe/0000:00:02.0/sriov_admin

  ├── .bulk_profile
  │   ├── exec_quantum_ms
  │   ├── preempt_timeout_us
  │   └── sched_priority
  ├── pf
  │   ├── device -> ../../../0000:00:02.0
  │   └── profile
  │       ├── exec_quantum_ms
  │       ├── preempt_timeout_us
  │       └── sched_priority
  ├── vf1
  │   ├── device -> ../../../0000:00:02.1
  │   ├── profile
  │   │   ├── exec_quantum_ms
  │   │   ├── preempt_timeout_us
  │   │   └── sched_priority
  │   └── stop
  ├── vf2
  │   ├── device -> ../../../0000:00:02.2
  │   ├── profile
  │   │   ├── exec_quantum_ms
  │   │   ├── preempt_timeout_us
  │   │   └── sched_priority
  │   └── stop
  └── vf3
      ├── profile
      │   ├── exec_quantum_ms
      │   ├── preempt_timeout_us
      │   └── sched_priority
      └── stop
Cc Lucas De Marchi <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Tvrtko Ursulin <[email protected]>
Cc Matthew Brost <[email protected]>

v1: https://patchwork.freedesktop.org/series/156220/#rev1
v2: https://patchwork.freedesktop.org/series/156220/#rev2
drop dbg messages about unexpected attr usage (Lucas) use single lock while configuring all GTs (Lucas) drop redundant comment (Piotr)
drop reset file (Rodrigo, Lucas)
update kernel version (Rodrigo)
v3:
fix typo, unify kernel-doc (Piotr)
add debug message about inconsistency (Piotr) small nit in emit_choice (Lucas)
fix patch title (Piotr)
some doc rewording (Lucas)

Michal Wajdeczko (17):
drm/xe/pf: Prepare sysfs for SR-IOV admin attributes drm/xe/pf: Take RPM during calls to SR-IOV attr.store() drm/xe/pf: Add _locked variants of the VF EQ config functions drm/xe/pf: Add _locked variants of the VF PT config functions drm/xe/pf: Allow change PF and VFs EQ/PT using sysfs drm/xe/pf: Relax report helper to accept PF in bulk configs drm/xe/pf: Fix signature of internal config helpers drm/xe/pf: Add functions to bulk configure EQ/PT on GT drm/xe/pf: Add functions to bulk provision EQ/PT drm/xe/pf: Allow bulk change all VFs EQ/PT using sysfs drm/xe/pf: Add functions to provision scheduling priority drm/xe/pf: Allow bulk change all VFs priority using sysfs drm/xe/pf: Allow change PF scheduling priority using sysfs drm/xe/pf: Promote xe_pci_sriov_get_vf_pdev drm/xe/pf: Add sysfs device symlinks to enabled VFs drm/xe/pf: Allow to stop the VF using sysfs drm/xe/pf: Add documentation for sriov_admin attributes

 .../ABI/testing/sysfs-driver-intel-xe-sriov   | 159 +++++
 drivers/gpu/drm/xe/Makefile                   |   1 +
 drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c    | 200 ++++--
 drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h    |  10 +
 drivers/gpu/drm/xe/xe_pci_sriov.c             |  41 +-
 drivers/gpu/drm/xe/xe_pci_sriov.h             |   1 +
 drivers/gpu/drm/xe/xe_sriov_pf.c              |   5 +
 drivers/gpu/drm/xe/xe_sriov_pf_provision.c    | 284 ++++++++
 drivers/gpu/drm/xe/xe_sriov_pf_provision.h    |  14 +
 drivers/gpu/drm/xe/xe_sriov_pf_sysfs.c        | 647 ++++++++++++++++++
 drivers/gpu/drm/xe/xe_sriov_pf_sysfs.h        |  16 +
 drivers/gpu/drm/xe/xe_sriov_pf_types.h        |  11 +
 12 files changed, 1337 insertions(+), 52 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-driver-intel-xe-sriov
 create mode 100644 drivers/gpu/drm/xe/xe_sriov_pf_sysfs.c
 create mode 100644 drivers/gpu/drm/xe/xe_sriov_pf_sysfs.h
Signature · 1 line
2.47.1