RE: [RFC PATCH 0/2] Resctrl - rewrite (WIP)

From: Luck, Tony
Date: Wed Jun 28 2023 - 12:12:33 EST


> Thanks for working on this! I played with these changes locally on
> some of our machines and they seemed reasonably functional so far and
> was happy to see dynamically adding and removing resources working.

Thanks for taking it for a spin on some additional systems.

> I will need to try working with the code to give it a serious
> evaluation, though. Would you consider it ready for me to try
> re-implementing soft RMIDs on it?

Current code is:
1) Lacking locking for access to files created on behalf of dynamic
loaded modules. So, I expect the system to crash if you unload a
module while simultaneously accessing one of those files.
2) Lacking error checking and cleanup code paths to undo
partial operations when things fail to allocate.
3) The unmount (sb_kill()) code has fallen far behind development
of other features. So expect memory leaks if you unmount and
remount.

It should be OK to play around with this version, but things will go
wrong when the system is under stress. Do not use in production!!

All of the RMID allocation and understanding of hierarchy between
control and monitor groups is localized in fs/resctrl2/arch/x86/rdt_monitor.c
I think I'm mostly done with the functionality I need in that file, so
work you do there for soft RMIDs is unlikely to need refactoring for
other changes that I'm making.

> I'm also very interested in James's opinion and what this means for
> the ongoing MPAM upstreaming.

Me too. I'm hopeful that my code can be a better base than the legacy
resctrl code. But it needs an MPAM expert to really assess that.

-Tony