Re: [PATCH v9 01/13] x86/resctrl: Rename and move rdt files to new directory

From: Ingo Molnar
Date: Fri Nov 23 2018 - 06:41:11 EST



* Borislav Petkov <bp@xxxxxxxxx> wrote:

> On Fri, Nov 23, 2018 at 09:41:17AM +0100, Ingo Molnar wrote:
> > Then at least make the directory name resource_control/, which is only
> > marginally longer and a lot more readable.
> >
> > We really don't have to fit directly names into the 8 character DOS limit
> > anymore. ;-)
>
> How about
>
> resource_ctl
>
> ?

The thing is, thinking about this as a 'CPU resource' is really a
misnomer on the conceptual level, which is why it's bothering me: RDT is
not really about 'CPU resources', because registers are CPU resources,
ioports and iomem are CPU resources, APICs are CPU resources and PMU
events are resources - none of which is part of RDT.

The key difference in RDT is that they are *shared* resources - caches
really - where the ad-hoc cache sharing might be causing security and
scalability problems so there's partitioning and throttling (bandwidth
control) support in the hardware.

Is there any other resource handled than caches by RDT or by the AMD
variant?

So how about "cache_control"? It's shorter and a lot closer to what the
code actually does.

> resource_control/ is kinda long-ish and the other names we have there
> are nice and short, see below.
>
> BTW, while we're talking renaming, I have a patch which renames the MCE
> pile and am planning to slap it in around -rc6 timeframe since we don't
> have a lot of RAS commits this time around, see also the end of this
> mail. It makes the naming there all nicely regular. :)

That's cool - these IMHO need to be done periodically to keep overall
namespace complexity low enough. (As long as can be done without breaking
any ABI that is.)

> 15 files changed, 14 insertions(+), 14 deletions(-)
> rename arch/x86/kernel/cpu/{mcheck => mce}/Makefile (52%)
> rename arch/x86/kernel/cpu/{mcheck/mce_amd.c => mce/amd.c} (99%)
> rename arch/x86/kernel/cpu/{mcheck/mce-apei.c => mce/apei.c} (99%)
> rename arch/x86/kernel/cpu/{mcheck/mce.c => mce/core.c} (99%)
> rename arch/x86/kernel/cpu/{mcheck => mce}/dev-mcelog.c (99%)
> rename arch/x86/kernel/cpu/{mcheck/mce-genpool.c => mce/genpool.c} (99%)
> rename arch/x86/kernel/cpu/{mcheck/mce-inject.c => mce/inject.c} (99%)
> rename arch/x86/kernel/cpu/{mcheck/mce_intel.c => mce/intel.c} (99%)
> rename arch/x86/kernel/cpu/{mcheck/mce-internal.h => mce/internal.h} (100%)
> rename arch/x86/kernel/cpu/{mcheck => mce}/p5.c (100%)
> rename arch/x86/kernel/cpu/{mcheck/mce-severity.c => mce/severity.c} (99%)
> rename arch/x86/kernel/cpu/{mcheck => mce}/therm_throt.c (100%)
> rename arch/x86/kernel/cpu/{mcheck => mce}/threshold.c (100%)
> rename arch/x86/kernel/cpu/{mcheck => mce}/winchip.c (100%)

Standardizing around 'MCE' sounds good to me!

Thanks,

Ingo