lkml.org 
[lkml]   [2016]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cacheinfo: Introduce cache id
On Fri, Jul 01, 2016 at 12:21:43PM +0200, Borislav Petkov wrote:
> On Wed, Jun 29, 2016 at 06:56:10PM -0700, Fenghua Yu wrote:
> > From: Fenghua Yu <fenghua.yu@intel.com>
> >
> > Each cache node is described by cacheinfo and is a unique node across
>
> What is a cache node?

Clearly not a good name for the concept we are trying to communicate here.
Better suggestions welcome!

Here's the situation. We have lots of (mostly) independent caches on a system.
The L3 cache (also called LLC - Last Level Cache - in some documentation) is
usually shared by all cpus on a physical socket. The L1 and L2 caches are
typically local to a core, so only shared by the hyperthreads on a core.
But I say "usually" and "typically" because the architecture doesn't require
that. We could have multiple separate L3 caches on a socket with a subset of
cpus assigned to each of them. We could have an L2 cache that is shared by
two or more cores.

/sys/devices/system/cpu/cpu*/cache/index*/shared_cpu_{list,map} allow for
arbitrary sharing schemes and tell you which caches are shared among which
groups of Linux logical cpus.

What we don't have is a *name* for each cache.

CAT (Intel Cache Allocation Technology) allows us to partition caches
on a per task basis. E.g. process A can only use 20% of the L3 cache on
socket0, process B can use 40% (that doesn't overlap with the 20% assigned
to process A - or perhaps does overlap - the feature is quite versatile).
But since caches aren't necessarily mapped to sockets or cores, we need a
name for each cache.


> And since this patch adds the generic functionality and then enables it
> on x86, it should be split into two patches.

Mea culpa. Fenghua had split this as you suggest, and I said "with just
23 lines added this can be one patch". Sorry Fenghua.

-Tony

\
 
 \ /
  Last update: 2016-07-01 19:41    [W:0.063 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site