Skip to content

Pull Request - MPAM mbw hard limit for 6.17 HWE#360

Closed
fyu1 wants to merge 9 commits into
NVIDIA:24.04_linux-nvidia-6.17-nextfrom
fyu1:24.04_linux-nvidia-6.17-next.hardlimit2
Closed

Pull Request - MPAM mbw hard limit for 6.17 HWE#360
fyu1 wants to merge 9 commits into
NVIDIA:24.04_linux-nvidia-6.17-nextfrom
fyu1:24.04_linux-nvidia-6.17-next.hardlimit2

Conversation

@fyu1
Copy link
Copy Markdown
Collaborator

@fyu1 fyu1 commented Apr 14, 2026

Please pull the branch to 6.17 HWE.

The top 9 commits implements MPAM mbw hard limit feature.


LP: https://bugs.launchpad.net/ubuntu/+source/linux-nvidia-6.17/+bug/2150290

Copy link
Copy Markdown
Collaborator

@jamieNguyenNVIDIA jamieNguyenNVIDIA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these should be NVIDIA: VR: SAUCE rather than NVIDIA: SAUCE.

Also, did any of these patches originate from elsewhere? If so, you ought to add the "cherry picked from" or "backported from" note in the trailer.

Comment thread drivers/resctrl/mpam_resctrl.c Outdated
break;
}
fallthrough;
break;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the desired behavior if configured_by is not set here?

Previously, this would have fallen through to goto err. But now, we'd continue on with variable being uninitialized. Is this intentional?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jamieNguyenNVIDIA Good catch. I fixed the goto err issue and NVIDIA: VR: SAUCE tags.

@fyu1 fyu1 force-pushed the 24.04_linux-nvidia-6.17-next.hardlimit2 branch 2 times, most recently from c2b44d4 to af26ddc Compare April 15, 2026 01:39
@fyu1 fyu1 requested review from clsotog and nirmoy April 15, 2026 19:20
@jamieNguyenNVIDIA
Copy link
Copy Markdown
Collaborator

Hi @fyu1, this series looks good to me. Thanks!

I only wonder if we want to wait for your LKML posting before sending to Canonical so that you can add (backported from) information to each commit.

@nvmochs
Copy link
Copy Markdown
Collaborator

nvmochs commented Apr 16, 2026

@fyu1 I reviewed the series manually and with claude and did not spot any issues.

Do you anticipate this will be posted to LKML soon? I agree with Jamie that it would be helpful to have a LKML reference for keeping track of the history of these patches.

@nvidia-bfigg nvidia-bfigg force-pushed the 24.04_linux-nvidia-6.17-next branch from 8b07926 to 80bac29 Compare April 21, 2026 12:02
fyu1 added 9 commits April 24, 2026 22:47
Add RDT_RESOURCE_MB_HLIM and RESCTRL_SCHEMA_MB_HLIM for per-domain
MBW maximum hard-limit control on ARM MPAM. Document the schema in
kernel-doc. Extend resctrl_get_default_ctrl() for RESCTRL_SCHEMA_MB_HLIM
(default 0).

Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
…etup

Add mb_hlim parsing and validation (0/1), wire RESCTRL_SCHEMA_MB_HLIM
into schemata and control-group setup, align MB_HLIM with MBA for
exclusive mode and pseudo-locking, and default new groups to hardlim off.

Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
…lim_rw

Read mbw_max_lim from MPAMF_MBW_IDR.MAX_LIM when MBW_MAX is present,
derive mpam_feat_mbw_max_hardlim_rw when both soft and hard limiting
are supported, and merge mbw_max_lim and the feature across MSCs.
Add mpam_props_sync_mbw_max_hardlim_rw() and propagate merged state in
__props_mismatch().

Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
Add mbw_max_hardlim to mpam_config. When reprogramming MBW_MAX, OR in
HARDLIM (MPAMCFG_MBW_MAX bit 31) when either MBW_MAX or HARDLIM_RW
features are active. Merge HARDLIM in mpam_update_config().

Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
When mpam_feat_mbw_max_hardlim_rw is present, share the MBA MPAM class
with RDT_RESOURCE_MB_HLIM. Wire resctrl_arch_get_config and
resctrl_arch_update_one for MB_HLIM, and tear down MBA and MB_HLIM
controls together on class removal.

Handle RDT_RESOURCE_MB_HLIM in fflags_from_resource() so creating
info/MB_HLIM at resctrl mount does not hit the unhandled-rid WARN.

Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
Add mb_max_lim and arch_has_mb_max_lim to struct resctrl_membw with
kernel-doc: MPAM MAX_LIM encoding (MPAMF_MBW_IDR), invalid elsewhere
unless arch sets arch_has_mb_max_lim.

Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
When mpam_feat_mbw_max is present, set membw.mb_max_lim from
cprops->mbw_max_lim and membw.arch_has_mb_max_lim so generic resctrl can
expose max_lim.

Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
… init

Add rdt_mb_max_lim_show() and the max_lim entry in res_common_files[].
Add mb_max_lim_init() to call resctrl_file_fflags_init("max_lim", ...)
when arch_has_mb_max_lim, and invoke it from resctrl_init() after
io_alloc_init().

Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
…IM for MPAM MBA

Document the MBA max_lim sysfs file, MB_HLIM schemata (0/1 per domain),
and how they relate to MPAM MBW_MAX, HARDLIM, and MPAMF_MBW_IDR.MAX_LIM.
Add schema_format for mb_hlim under the MB allocation info directory.

max_lim is exposed as a single decimal integer (MPAMF_MBW_IDR.MAX_LIM
[1:0], 0–3), matching rdt_mb_max_lim_show(). MB_HLIM appears when the
probe treats HARDLIM as read/write, which this series ties to max_lim
reading zero (see mpam_props_sync_mbw_max_hardlim_rw()).

Signed-off-by: Fenghua Yu <fenghuay@nvidia.com>
@fyu1 fyu1 force-pushed the 24.04_linux-nvidia-6.17-next.hardlimit2 branch from af26ddc to c939503 Compare April 24, 2026 22:58
@fyu1
Copy link
Copy Markdown
Collaborator Author

fyu1 commented Apr 24, 2026

Rebase the hardlimit patches to the latest 6.17 hwe kernel. There is no conflict. The hardlimit and basic functions are tested.

@nvmochs
Copy link
Copy Markdown
Collaborator

nvmochs commented Apr 24, 2026

Verified no change between when I last reviewed and the rebase.

 1:  64b04bc6b52c =  1:  62a1422201d6 NVIDIA: VR: SAUCE: resctrl: add MB_HLIM resource ID and schema type
 2:  15114bfd7243 =  2:  b05aae044c5f NVIDIA: VR: SAUCE: resctrl: wire MB_HLIM schemata parsing and group setup
 3:  c1d6f83f78f6 =  3:  0320b591dc27 NVIDIA: VR: SAUCE: resctrl/mpam: probe MPAMF_MBW_IDR MAX_LIM and hardlim_rw
 4:  f7d03d7ee5d9 =  4:  0b8e57af9945 NVIDIA: VR: SAUCE: resctrl/mpam: track MBW max hard-limit in config
 5:  9be5038a1cc9 =  5:  397a4db69ce2 NVIDIA: VR: SAUCE: resctrl/mpam: bind MB_HLIM resource to MBA MPAM class
 6:  6ce8d18d8cad =  6:  f82a933ec983 NVIDIA: VR: SAUCE: resctrl: add membw.mb_max_lim and arch_has_mb_max_lim
 7:  9b2f52de5649 =  7:  bc9488c36fcf NVIDIA: VR: SAUCE: resctrl/mpam: populate MBA mb_max_lim from MPAM probe
 8:  c6a798951f02 =  8:  522b71c12ce4 NVIDIA: VR: SAUCE: resctrl: add MBA max_lim sysfs and visibility from init
 9:  af26ddcfeb72 =  9:  c939503d0b7a NVIDIA: VR: SAUCE: Documentation: resctrl: document max_lim and MB_HLIM for MPAM MBA

No further issues from me.

Acked-by: Matthew R. Ochs <mochs@nvidia.com>

@github-actions
Copy link
Copy Markdown
Contributor

PR Validation Report

Patchscan ✅ No Missing Fixes

All cherry-picked commits checked — no missing upstream fixes found.

PR Lint ❌ Errors found

Details
Checking 9 commits...

Cherry-pick digest:
┌──────────────┬───────────────────────────────────────────────┬────────────┬─────────┬───────────────────────────┐
│ Local        │ Referenced upstream / Patch subject           │ Patch-ID   │ Subject │ SoB chain                 │
├──────────────┼───────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ c939503d0b7a │ [SAUCE] documentation: resctrl: document max_ │ N/A        │ N/A     │ fenghuay                  │
├──────────────┼───────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 522b71c12ce4 │ [SAUCE] resctrl: add mba max_lim sysfs and vi │ N/A        │ N/A     │ fenghuay                  │
├──────────────┼───────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ bc9488c36fcf │ [SAUCE] resctrl/mpam: populate mba mb_max_lim │ N/A        │ N/A     │ fenghuay                  │
├──────────────┼───────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ f82a933ec983 │ [SAUCE] resctrl: add membw.mb_max_lim and arc │ N/A        │ N/A     │ fenghuay                  │
├──────────────┼───────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 397a4db69ce2 │ [SAUCE] resctrl/mpam: bind mb_hlim resource t │ N/A        │ N/A     │ fenghuay                  │
├──────────────┼───────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 0b8e57af9945 │ [SAUCE] resctrl/mpam: track mbw max hard-limi │ N/A        │ N/A     │ fenghuay                  │
├──────────────┼───────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 0320b591dc27 │ [SAUCE] resctrl/mpam: probe mpamf_mbw_idr max │ N/A        │ N/A     │ fenghuay                  │
├──────────────┼───────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ b05aae044c5f │ [SAUCE] resctrl: wire mb_hlim schemata parsin │ N/A        │ N/A     │ fenghuay                  │
├──────────────┼───────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 62a1422201d6 │ [SAUCE] resctrl: add mb_hlim resource id and  │ N/A        │ N/A     │ fenghuay                  │
└──────────────┴───────────────────────────────────────────────┴────────────┴─────────┴───────────────────────────┘

Lint: all checks passed.

PR metadata:
W: PR title missing [<branch>] prefix: "Pull Request - MPAM mbw hard limit for 6.17 HWE"
E: PR targets 24.04_linux-nvidia-6.17-next but body has no 'BugLink:' or 'LP:' https://bugs.launchpad.net/... line

@jamieNguyenNVIDIA
Copy link
Copy Markdown
Collaborator

Acked-by: Jamie Nguyen <jamien@nvidia.com>

Thanks @fyu1!

@nvmochs
Copy link
Copy Markdown
Collaborator

nvmochs commented Apr 25, 2026

Merged, closing PR.

93e1b6a2b372 (nnoble/nvidia-6.17-next) NVIDIA: VR: SAUCE: Documentation: resctrl: document max_lim and MB_HLIM for MPAM MBA
be13cad9cd15 NVIDIA: VR: SAUCE: resctrl: add MBA max_lim sysfs and visibility from init
05b9bc183101 NVIDIA: VR: SAUCE: resctrl/mpam: populate MBA mb_max_lim from MPAM probe
7939f1e41019 NVIDIA: VR: SAUCE: resctrl: add membw.mb_max_lim and arch_has_mb_max_lim
04e2ea343852 NVIDIA: VR: SAUCE: resctrl/mpam: bind MB_HLIM resource to MBA MPAM class
114894b316e4 NVIDIA: VR: SAUCE: resctrl/mpam: track MBW max hard-limit in config
ced4d460ce56 NVIDIA: VR: SAUCE: resctrl/mpam: probe MPAMF_MBW_IDR MAX_LIM and hardlim_rw
6911e81a21d2 NVIDIA: VR: SAUCE: resctrl: wire MB_HLIM schemata parsing and group setup
9fc8c60cb42b NVIDIA: VR: SAUCE: resctrl: add MB_HLIM resource ID and schema type

@nvmochs nvmochs closed this Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants