RE: [PATCH] x86/resctrl: mba_MBps: Fall back to total b/w if local b/w unavailable

From: Luck, Tony
Date: Wed Oct 25 2023 - 20:10:34 EST


> Lets not make it global yet. This is only affecting couple of functions
> when mba_MPps is enabled.

See v2 (just posted). I made it "static" in monitor.c since both the
functions that need it are in that file.

>> time. No need to check every time to see if is_mbm_local_enabled()
>> somehow changed and local b/w measurements were suddenly
>> available!
>
> What changed suddenly? Can you please elaborate.

Nothing is going to change. If the system doesn't support local memory
bandwidth reporting when it booted, it isn't going to start doing so.
Same in reverse. If you have local bandwidth reporting, it won't
go away.

So at resctrl init time when discovering which of local & total are supported,
just save the event id to use for mba_MBps at that point.

-Tony