RE: [RFC PATCH 0/7] Add driver registration i/f to resctrl

From: Luck, Tony
Date: Tue May 09 2023 - 20:52:26 EST


> It is hard to tell from just a diffstat how this implementation impacts
> the core. A similar diffstat for the driver implementation may
> help. "1300 insertions(+), 10 deletions(-)" does not seem like a lot of
> core refactoring.

Here's the resctrl bits of Fenghua's diffstat (with the filename of the new
feature changed to avoid giving too much away):

arch/x86/kernel/cpu/resctrl/core.c | 39 +++-
arch/x86/kernel/cpu/resctrl/newfeature.c | 780 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
arch/x86/kernel/cpu/resctrl/monitor.c | 4 +-
arch/x86/kernel/cpu/resctrl/rdtgroup.c | 333 ++++++++++++++++++++++++++++-

Changes to core files are ~375 lines ... about 50% more than I added to core code
to provide a registration hook for this and many other drivers. My driver registration
hooks will likely inflate by that much when the rough edges are smoothed.

-Tony