Re: [GIT PULL] x86/cache updates for 4.21

2018-12-28 Thread Ingo Molnar


* Borislav Petkov  wrote:

> On Wed, Dec 26, 2018 at 12:26:12PM -0800, Linus Torvalds wrote:
> > I've pulled this, but I think the new config option name is bad.
> > 
> > I think it should probably have been called "X86_RESCTRL" instead of
> > just "RESCTRL". That's way too generic a name for something that is
> > (at least currently) very much an x86 feature.
> 
> Right you are...

... and it's almost as if someone complained about this already:

   https://lkml.org/lkml/2018/11/23/389

   "Also, the Kconfig space, when it gets extended with the AMD bits, should
probably follow the same nomenclature: CONFIG_X86_CPU_RESOURCE_CONTROL=yor 
such."

;-)

Anyway, I kind of dropped the ball after that first round of complaints, 
should have looked again.

Thanks,

Ingo


Re: [GIT PULL] x86/cache updates for 4.21

2018-12-26 Thread pr-tracker-bot
The pull request you sent on Sun, 23 Dec 2018 13:48:59 +0100:

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-cache-for-linus

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/a52fb43a5faa40507cb164a793a7fa08da863ac7

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker


Re: [GIT PULL] x86/cache updates for 4.21

2018-12-26 Thread Linus Torvalds
On Wed, Dec 26, 2018 at 12:56 PM Borislav Petkov  wrote:
>
> The intent is, AFAIU, to keep at least the user interface in the resctrl
> fs the same as on x86 so that there's no unnecessary user confusion. And
> from peeking at that patchset a bit, it looks like we'll need a generic
>
> CONFIG_RESCTRL
>
> which should enable the arch-agnostic piece in fs/ and then
> the arch-specific counterpart which we'll probably put behind
> CONFIG_X86_RESCTRL and CONFIG_ARM64_RESCTRL, respectively.
>
> I guess I can send you a patch renaming the x86 config option to
> X86_RESCTRL and the ARM64 side will fall into place when ready. And
> it'll extract the generic bits into that separate generic config option.
>
> Thoughts?

That sounds mostly good to me. Except I still think that
"CONFIG_RESCTRL" is too generic, because it's really not about
resources in general, it's literally about specific CPU resources.

So I'd prefer to call the option for the generic code
"CONFIG_CPU_RESCTRL", which is then selected by the arch option (ie
CONFIG_{X86,ARM64}_RESCTRL).

Anyway, this is mostly bikeshedding, but naming is fairly important.
But not time-critical at this point,

 Linus


Re: [GIT PULL] x86/cache updates for 4.21

2018-12-26 Thread Borislav Petkov
On Wed, Dec 26, 2018 at 12:26:12PM -0800, Linus Torvalds wrote:
> I've pulled this, but I think the new config option name is bad.
> 
> I think it should probably have been called "X86_RESCTRL" instead of
> just "RESCTRL". That's way too generic a name for something that is
> (at least currently) very much an x86 feature.

Right you are...

> It not only is x86-specific right now, it's specific to very few
> resources. It's not like this is some generic resource control, it's
> very much about low-level CPU resources. That should show in the name.
> 
> I've left it alone, and maybe it might even be cross-architecture some
> day (there's already a hack in the scheduler),
> but I think it's a bit misleading to have so a common name for such a
> specialized thing.
>
> Even if it some day gets to be cross-architecture and isn't limited to
> x86, at that point it _still_ wouldn't be "RESCTRL", it would be
> "CPU_RESCTRL" or something.

... and yap, that is already going in the cross-arch direction as
apparently there's work to have a similar thing on the ARM64 side:

https://lore.kernel.org/lkml/20180824104519.11203-1-james.mo...@arm.com/T/#u

The intent is, AFAIU, to keep at least the user interface in the resctrl
fs the same as on x86 so that there's no unnecessary user confusion. And
from peeking at that patchset a bit, it looks like we'll need a generic

CONFIG_RESCTRL

which should enable the arch-agnostic piece in fs/ and then
the arch-specific counterpart which we'll probably put behind
CONFIG_X86_RESCTRL and CONFIG_ARM64_RESCTRL, respectively.

I guess I can send you a patch renaming the x86 config option to
X86_RESCTRL and the ARM64 side will fall into place when ready. And
it'll extract the generic bits into that separate generic config option.

Thoughts?

-- 
Regards/Gruss,
Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 
(AG Nürnberg)


Re: [GIT PULL] x86/cache updates for 4.21

2018-12-26 Thread Linus Torvalds
On Sun, Dec 23, 2018 at 4:49 AM Borislav Petkov  wrote:
>
>  - The generalization of the RDT code to accommodate the addition of AMD's
>very similar implementation of the cache monitoring feature.

I've pulled this, but I think the new config option name is bad.

I think it should probably have been called "X86_RESCTRL" instead of
just "RESCTRL". That's way too generic a name for something that is
(at least currently) very much an x86 feature.

It not only is x86-specific right now, it's specific to very few
resources. It's not like this is some generic resource control, it's
very much about low-level CPU resources. That should show in the name.

I've left it alone, and maybe it might even be cross-architecture some
day (there's already a hack in the scheduler), but I think it's a bit
misleading to have so a common name for such a specialized thing.

Even if it some day gets to be cross-architecture and isn't limited to
x86, at that point it _still_ wouldn't be "RESCTRL", it would be
"CPU_RESCTRL" or something.

No?

Linus


[GIT PULL] x86/cache updates for 4.21

2018-12-23 Thread Borislav Petkov
Hi Linus,

please pull the latest x86-cache-for-linus tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-cache-for-linus

This update contains:

 - The generalization of the RDT code to accommodate the addition of AMD's
   very similar implementation of the cache monitoring feature.

   This entails a subsystem move into a separate and generic
   arch/x86/kernel/cpu/resctrl/ directory along with adding
   vendor-specific initialization and feature detection helpers.

   Ontop of that is the unification of user-visible strings, both in the
   resctrl filesystem error handling and Kconfig.

   Provided by Babu Moger and Sherry Hurwitz.

 - Code simplifications and error handling improvements by Reinette
   Chatre.

And just because we're not having enough fun, this pull request
conflicts with the fs context changes in the vfs tree. Find the merge
conflict resolution (git show -M) at the end of this mail. For reference,
the merge resolution is also available at:

  git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git vfs-x86-cache

Thanks,
Boris.

-->

The following changes since commit 9ff01193a20d391e8dbce4403dd5ef87c7eaaca6:

  Linux 4.20-rc3 (2018-11-18 13:33:44 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-cache-for-linus

for you to fetch changes up to 52eb74339a6233c69f4e3794b69ea7c98eeeae1b:

  x86/resctrl: Fix rdt_find_domain() return value and checks (2018-12-11 
22:09:28 +0100)


Babu Moger (13):
  x86/resctrl: Rename and move rdt files to a separate directory
  x86/resctrl: Rename the RDT functions and definitions
  x86/resctrl: Re-arrange the RDT init code
  x86/resctrl: Move all the macros to resctrl/internal.h
  x86/resctrl: Initialize the vendor-specific resource functions
  x86/resctrl: Bring cbm_validate() into the resource structure
  x86/resctrl: Add vendor check for the MBA software controller
  x86/resctrl: Rename the config option INTEL_RDT to RESCTRL
  x86/resctrl: Fixup the user-visible strings
  x86/resctrl: Introduce AMD QOS feature
  Documentation: Rename and update intel_rdt_ui.txt to resctrl_ui.txt
  MAINTAINERS: Update resctrl filename patterns
  x86/resctrl: Remove unnecessary check for cbm_validate()

Reinette Chatre (2):
  x86/resctrl: Use rdt_last_cmd_puts() where possible
  x86/resctrl: Fix rdt_find_domain() return value and checks

Sherry Hurwitz (1):
  x86/resctrl: Add AMD's X86_FEATURE_MBA to the scattered CPUID features

 Documentation/x86/{intel_rdt_ui.txt => resctrl_ui.txt} 
|   9 ++-
 MAINTAINERS
|   6 +-
 arch/x86/Kconfig   
|  22 ---
 arch/x86/include/asm/{intel_rdt_sched.h => resctrl_sched.h}
|  28 -
 arch/x86/kernel/cpu/Makefile   
|   5 +-
 arch/x86/kernel/cpu/resctrl/Makefile   
|   4 ++
 arch/x86/kernel/cpu/{intel_rdt.c => resctrl/core.c}
| 186 +++-
 arch/x86/kernel/cpu/{intel_rdt_ctrlmondata.c => resctrl/ctrlmondata.c} 
| 107 --
 arch/x86/kernel/cpu/{intel_rdt.h => resctrl/internal.h}
|  55 +++---
 arch/x86/kernel/cpu/{intel_rdt_monitor.c => resctrl/monitor.c} 
|  16 +++---
 arch/x86/kernel/cpu/{intel_rdt_pseudo_lock.c => resctrl/pseudo_lock.c} 
|  40 ++---
 arch/x86/kernel/cpu/{intel_rdt_pseudo_lock_event.h => 
resctrl/pseudo_lock_event.h} |   2 +-
 arch/x86/kernel/cpu/{intel_rdt_rdtgroup.c => resctrl/rdtgroup.c}   
|  61 ++--
 arch/x86/kernel/cpu/scattered.c
|   7 ++-
 arch/x86/kernel/process_32.c   
|   4 +-
 arch/x86/kernel/process_64.c   
|   4 +-
 include/linux/sched.h  
|   2 +-
 17 files changed, 385 insertions(+), 173 deletions(-)
 rename Documentation/x86/{intel_rdt_ui.txt => resctrl_ui.txt} (99%)
 rename arch/x86/include/asm/{intel_rdt_sched.h => resctrl_sched.h} (77%)
 create mode 100644 arch/x86/kernel/cpu/resctrl/Makefile
 rename arch/x86/kernel/cpu/{intel_rdt.c => resctrl/core.c} (83%)
 rename arch/x86/kernel/cpu/{intel_rdt_ctrlmondata.c => resctrl/ctrlmondata.c} 
(81%)
 rename arch/x86/kernel/cpu/{intel_rdt.h => resctrl/internal.h} (91%)
 rename arch/x86/kernel/cpu/{intel_rdt_monitor.c => resctrl/monitor.c} (98%)
 rename arch/x86/kernel/cpu/{intel_rdt_pseudo_lock.c