All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cacheinfo: Introduce cache id
@ 2016-06-30  1:56 Fenghua Yu
  2016-06-30  1:56 ` Fenghua Yu
  2016-07-01 10:21 ` Borislav Petkov
  0 siblings, 2 replies; 15+ messages in thread
From: Fenghua Yu @ 2016-06-30  1:56 UTC (permalink / raw)
  To: Fenghua Yu, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Tony Luck, Peter Zijlstra, Stephane Eranian, Borislav Petkov,
	Ravi V Shankar, Vikas Shivappa
  Cc: linux-kernel, x86

From: Fenghua Yu <fenghua.yu@intel.com>

Each cache node is described by cacheinfo and is a unique node across
the platform. But there is no id for a cache node. We introduce cache ID
to identify a cache node.

Intel Cache Allocation Technology (CAT) allows some control on the
allocation policy within each cache that it controls. We need a unique
cache ID for each cache level to allow the user to specify which
controls are applied to which cache.

The cache id is first enabled on x86. It can be enabled on other platforms
as well. The cache id is not necessary contiguous.

Add an "id" entry to /sys/devices/system/cpu/cpu*/cache/index*/

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
---
 arch/x86/kernel/cpu/intel_cacheinfo.c | 21 +++++++++++++++++++++
 drivers/base/cacheinfo.c              |  5 +++++
 include/linux/cacheinfo.h             |  3 +++
 3 files changed, 29 insertions(+)

diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
index de6626c..aefc1e5 100644
--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -153,6 +153,7 @@ struct _cpuid4_info_regs {
 	union _cpuid4_leaf_eax eax;
 	union _cpuid4_leaf_ebx ebx;
 	union _cpuid4_leaf_ecx ecx;
+	unsigned int id;
 	unsigned long size;
 	struct amd_northbridge *nb;
 };
@@ -894,6 +895,9 @@ static void __cache_cpumap_setup(unsigned int cpu, int index,
 static void ci_leaf_init(struct cacheinfo *this_leaf,
 			 struct _cpuid4_info_regs *base)
 {
+	this_leaf->id = base->id;
+	/* Set CACHE_ID bit in attributes to enable cache id in x86. */
+	this_leaf->attributes = CACHE_ID;
 	this_leaf->level = base->eax.split.level;
 	this_leaf->type = cache_type_map[base->eax.split.type];
 	this_leaf->coherency_line_size =
@@ -920,6 +924,22 @@ static int __init_cache_level(unsigned int cpu)
 	return 0;
 }
 
+/*
+ * The max shared threads number comes from CPUID.4:EAX[25-14] with input
+ * ECX as cache index. Then right shift apicid by the number's order to get
+ * cache id for this cache node.
+ */
+static void get_cache_id(int cpu, struct _cpuid4_info_regs *id4_regs)
+{
+	struct cpuinfo_x86 *c = &cpu_data(cpu);
+	unsigned long num_threads_sharing;
+	int index_msb;
+
+	num_threads_sharing = 1 + id4_regs->eax.split.num_threads_sharing;
+	index_msb = get_count_order(num_threads_sharing);
+	id4_regs->id = c->apicid >> index_msb;
+}
+
 static int __populate_cache_leaves(unsigned int cpu)
 {
 	unsigned int idx, ret;
@@ -931,6 +951,7 @@ static int __populate_cache_leaves(unsigned int cpu)
 		ret = cpuid4_cache_lookup_regs(idx, &id4_regs);
 		if (ret)
 			return ret;
+		get_cache_id(cpu, &id4_regs);
 		ci_leaf_init(this_leaf++, &id4_regs);
 		__cache_cpumap_setup(cpu, idx, &id4_regs);
 	}
diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c
index e9fd32e..2a21c15 100644
--- a/drivers/base/cacheinfo.c
+++ b/drivers/base/cacheinfo.c
@@ -233,6 +233,7 @@ static ssize_t file_name##_show(struct device *dev,		\
 	return sprintf(buf, "%u\n", this_leaf->object);		\
 }
 
+show_one(id, id);
 show_one(level, level);
 show_one(coherency_line_size, coherency_line_size);
 show_one(number_of_sets, number_of_sets);
@@ -314,6 +315,7 @@ static ssize_t write_policy_show(struct device *dev,
 	return n;
 }
 
+static DEVICE_ATTR_RO(id);
 static DEVICE_ATTR_RO(level);
 static DEVICE_ATTR_RO(type);
 static DEVICE_ATTR_RO(coherency_line_size);
@@ -327,6 +329,7 @@ static DEVICE_ATTR_RO(shared_cpu_list);
 static DEVICE_ATTR_RO(physical_line_partition);
 
 static struct attribute *cache_default_attrs[] = {
+	&dev_attr_id.attr,
 	&dev_attr_type.attr,
 	&dev_attr_level.attr,
 	&dev_attr_shared_cpu_map.attr,
@@ -350,6 +353,8 @@ cache_default_attrs_is_visible(struct kobject *kobj,
 	const struct cpumask *mask = &this_leaf->shared_cpu_map;
 	umode_t mode = attr->mode;
 
+	if ((attr == &dev_attr_id.attr) && this_leaf->attributes & CACHE_ID)
+		return mode;
 	if ((attr == &dev_attr_type.attr) && this_leaf->type)
 		return mode;
 	if ((attr == &dev_attr_level.attr) && this_leaf->level)
diff --git a/include/linux/cacheinfo.h b/include/linux/cacheinfo.h
index 2189935..16e5573 100644
--- a/include/linux/cacheinfo.h
+++ b/include/linux/cacheinfo.h
@@ -18,6 +18,7 @@ enum cache_type {
 
 /**
  * struct cacheinfo - represent a cache leaf node
+ * @id: id of this cache node. This is unique id across the platform.
  * @type: type of the cache - data, inst or unified
  * @level: represents the hierarchy in the multi-level cache
  * @coherency_line_size: size of each cache line usually representing
@@ -44,6 +45,7 @@ enum cache_type {
  * keeping, the remaining members form the core properties of the cache
  */
 struct cacheinfo {
+	unsigned int id;
 	enum cache_type type;
 	unsigned int level;
 	unsigned int coherency_line_size;
@@ -61,6 +63,7 @@ struct cacheinfo {
 #define CACHE_WRITE_ALLOCATE	BIT(3)
 #define CACHE_ALLOCATE_POLICY_MASK	\
 	(CACHE_READ_ALLOCATE | CACHE_WRITE_ALLOCATE)
+#define CACHE_ID		BIT(4)
 
 	struct device_node *of_node;
 	bool disable_sysfs;
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH] cacheinfo: Introduce cache id
  2016-06-30  1:56 [PATCH] cacheinfo: Introduce cache id Fenghua Yu
@ 2016-06-30  1:56 ` Fenghua Yu
  2016-07-01 10:21 ` Borislav Petkov
  1 sibling, 0 replies; 15+ messages in thread
From: Fenghua Yu @ 2016-06-30  1:56 UTC (permalink / raw)
  To: Fenghua Yu, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Tony Luck, Peter Zijlstra, Stephane Eranian, Borislav Petkov,
	Ravi V Shankar, Vikas Shivappa
  Cc: linux-kernel, x86

From: Fenghua Yu <fenghua.yu@intel.com>

Each cache node is described by cacheinfo and is a unique node across
the platform. But there is no id for a cache node. We introduce cache ID
to identify a cache node.

Intel Cache Allocation Technology (CAT) allows some control on the
allocation policy within each cache that it controls. We need a unique
cache ID for each cache level to allow the user to specify which
controls are applied to which cache.

The cache id is first enabled on x86. It can be enabled on other platforms
as well. The cache id is not necessary contiguous.

Add an "id" entry to /sys/devices/system/cpu/cpu*/cache/index*/

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
---
 arch/x86/kernel/cpu/intel_cacheinfo.c | 21 +++++++++++++++++++++
 drivers/base/cacheinfo.c              |  5 +++++
 include/linux/cacheinfo.h             |  3 +++
 3 files changed, 29 insertions(+)

diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
index de6626c..aefc1e5 100644
--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -153,6 +153,7 @@ struct _cpuid4_info_regs {
 	union _cpuid4_leaf_eax eax;
 	union _cpuid4_leaf_ebx ebx;
 	union _cpuid4_leaf_ecx ecx;
+	unsigned int id;
 	unsigned long size;
 	struct amd_northbridge *nb;
 };
@@ -894,6 +895,9 @@ static void __cache_cpumap_setup(unsigned int cpu, int index,
 static void ci_leaf_init(struct cacheinfo *this_leaf,
 			 struct _cpuid4_info_regs *base)
 {
+	this_leaf->id = base->id;
+	/* Set CACHE_ID bit in attributes to enable cache id in x86. */
+	this_leaf->attributes = CACHE_ID;
 	this_leaf->level = base->eax.split.level;
 	this_leaf->type = cache_type_map[base->eax.split.type];
 	this_leaf->coherency_line_size =
@@ -920,6 +924,22 @@ static int __init_cache_level(unsigned int cpu)
 	return 0;
 }
 
+/*
+ * The max shared threads number comes from CPUID.4:EAX[25-14] with input
+ * ECX as cache index. Then right shift apicid by the number's order to get
+ * cache id for this cache node.
+ */
+static void get_cache_id(int cpu, struct _cpuid4_info_regs *id4_regs)
+{
+	struct cpuinfo_x86 *c = &cpu_data(cpu);
+	unsigned long num_threads_sharing;
+	int index_msb;
+
+	num_threads_sharing = 1 + id4_regs->eax.split.num_threads_sharing;
+	index_msb = get_count_order(num_threads_sharing);
+	id4_regs->id = c->apicid >> index_msb;
+}
+
 static int __populate_cache_leaves(unsigned int cpu)
 {
 	unsigned int idx, ret;
@@ -931,6 +951,7 @@ static int __populate_cache_leaves(unsigned int cpu)
 		ret = cpuid4_cache_lookup_regs(idx, &id4_regs);
 		if (ret)
 			return ret;
+		get_cache_id(cpu, &id4_regs);
 		ci_leaf_init(this_leaf++, &id4_regs);
 		__cache_cpumap_setup(cpu, idx, &id4_regs);
 	}
diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c
index e9fd32e..2a21c15 100644
--- a/drivers/base/cacheinfo.c
+++ b/drivers/base/cacheinfo.c
@@ -233,6 +233,7 @@ static ssize_t file_name##_show(struct device *dev,		\
 	return sprintf(buf, "%u\n", this_leaf->object);		\
 }
 
+show_one(id, id);
 show_one(level, level);
 show_one(coherency_line_size, coherency_line_size);
 show_one(number_of_sets, number_of_sets);
@@ -314,6 +315,7 @@ static ssize_t write_policy_show(struct device *dev,
 	return n;
 }
 
+static DEVICE_ATTR_RO(id);
 static DEVICE_ATTR_RO(level);
 static DEVICE_ATTR_RO(type);
 static DEVICE_ATTR_RO(coherency_line_size);
@@ -327,6 +329,7 @@ static DEVICE_ATTR_RO(shared_cpu_list);
 static DEVICE_ATTR_RO(physical_line_partition);
 
 static struct attribute *cache_default_attrs[] = {
+	&dev_attr_id.attr,
 	&dev_attr_type.attr,
 	&dev_attr_level.attr,
 	&dev_attr_shared_cpu_map.attr,
@@ -350,6 +353,8 @@ cache_default_attrs_is_visible(struct kobject *kobj,
 	const struct cpumask *mask = &this_leaf->shared_cpu_map;
 	umode_t mode = attr->mode;
 
+	if ((attr == &dev_attr_id.attr) && this_leaf->attributes & CACHE_ID)
+		return mode;
 	if ((attr == &dev_attr_type.attr) && this_leaf->type)
 		return mode;
 	if ((attr == &dev_attr_level.attr) && this_leaf->level)
diff --git a/include/linux/cacheinfo.h b/include/linux/cacheinfo.h
index 2189935..16e5573 100644
--- a/include/linux/cacheinfo.h
+++ b/include/linux/cacheinfo.h
@@ -18,6 +18,7 @@ enum cache_type {
 
 /**
  * struct cacheinfo - represent a cache leaf node
+ * @id: id of this cache node. This is unique id across the platform.
  * @type: type of the cache - data, inst or unified
  * @level: represents the hierarchy in the multi-level cache
  * @coherency_line_size: size of each cache line usually representing
@@ -44,6 +45,7 @@ enum cache_type {
  * keeping, the remaining members form the core properties of the cache
  */
 struct cacheinfo {
+	unsigned int id;
 	enum cache_type type;
 	unsigned int level;
 	unsigned int coherency_line_size;
@@ -61,6 +63,7 @@ struct cacheinfo {
 #define CACHE_WRITE_ALLOCATE	BIT(3)
 #define CACHE_ALLOCATE_POLICY_MASK	\
 	(CACHE_READ_ALLOCATE | CACHE_WRITE_ALLOCATE)
+#define CACHE_ID		BIT(4)
 
 	struct device_node *of_node;
 	bool disable_sysfs;
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH] cacheinfo: Introduce cache id
  2016-06-30  1:56 [PATCH] cacheinfo: Introduce cache id Fenghua Yu
  2016-06-30  1:56 ` Fenghua Yu
@ 2016-07-01 10:21 ` Borislav Petkov
  2016-07-01 16:50   ` Luck, Tony
  1 sibling, 1 reply; 15+ messages in thread
From: Borislav Petkov @ 2016-07-01 10:21 UTC (permalink / raw)
  To: Fenghua Yu
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Tony Luck,
	Peter Zijlstra, Stephane Eranian, Ravi V Shankar, Vikas Shivappa,
	linux-kernel, x86

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?

> the platform. But there is no id for a cache node. We introduce cache ID
> to identify a cache node.
> 
> Intel Cache Allocation Technology (CAT) allows some control on the
> allocation policy within each cache that it controls. We need a unique
> cache ID for each cache level to allow the user to specify which
> controls are applied to which cache.
> 
> The cache id is first enabled on x86. It can be enabled on other platforms
> as well. The cache id is not necessary contiguous.
> 
> Add an "id" entry to /sys/devices/system/cpu/cpu*/cache/index*/
> 
> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
> ---
>  arch/x86/kernel/cpu/intel_cacheinfo.c | 21 +++++++++++++++++++++
>  drivers/base/cacheinfo.c              |  5 +++++
>  include/linux/cacheinfo.h             |  3 +++
>  3 files changed, 29 insertions(+)
> 
> diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
> index de6626c..aefc1e5 100644
> --- a/arch/x86/kernel/cpu/intel_cacheinfo.c
> +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
> @@ -153,6 +153,7 @@ struct _cpuid4_info_regs {
>  	union _cpuid4_leaf_eax eax;
>  	union _cpuid4_leaf_ebx ebx;
>  	union _cpuid4_leaf_ecx ecx;
> +	unsigned int id;
>  	unsigned long size;
>  	struct amd_northbridge *nb;
>  };
> @@ -894,6 +895,9 @@ static void __cache_cpumap_setup(unsigned int cpu, int index,
>  static void ci_leaf_init(struct cacheinfo *this_leaf,
>  			 struct _cpuid4_info_regs *base)
>  {
> +	this_leaf->id = base->id;
> +	/* Set CACHE_ID bit in attributes to enable cache id in x86. */

No need for that comment.

> +	this_leaf->attributes = CACHE_ID;
>  	this_leaf->level = base->eax.split.level;
>  	this_leaf->type = cache_type_map[base->eax.split.type];
>  	this_leaf->coherency_line_size =
> @@ -920,6 +924,22 @@ static int __init_cache_level(unsigned int cpu)
>  	return 0;
>  }
>  
> +/*
> + * The max shared threads number comes from CPUID.4:EAX[25-14] with input
> + * ECX as cache index. Then right shift apicid by the number's order to get
> + * cache id for this cache node.
> + */
> +static void get_cache_id(int cpu, struct _cpuid4_info_regs *id4_regs)
> +{
> +	struct cpuinfo_x86 *c = &cpu_data(cpu);
> +	unsigned long num_threads_sharing;
> +	int index_msb;
> +
> +	num_threads_sharing = 1 + id4_regs->eax.split.num_threads_sharing;
> +	index_msb = get_count_order(num_threads_sharing);
> +	id4_regs->id = c->apicid >> index_msb;
> +}
> +
>  static int __populate_cache_leaves(unsigned int cpu)
>  {
>  	unsigned int idx, ret;
> @@ -931,6 +951,7 @@ static int __populate_cache_leaves(unsigned int cpu)
>  		ret = cpuid4_cache_lookup_regs(idx, &id4_regs);
>  		if (ret)
>  			return ret;
> +		get_cache_id(cpu, &id4_regs);
>  		ci_leaf_init(this_leaf++, &id4_regs);
>  		__cache_cpumap_setup(cpu, idx, &id4_regs);
>  	}
> diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c
> index e9fd32e..2a21c15 100644
> --- a/drivers/base/cacheinfo.c
> +++ b/drivers/base/cacheinfo.c
> @@ -233,6 +233,7 @@ static ssize_t file_name##_show(struct device *dev,		\
>  	return sprintf(buf, "%u\n", this_leaf->object);		\
>  }
>  
> +show_one(id, id);
>  show_one(level, level);
>  show_one(coherency_line_size, coherency_line_size);
>  show_one(number_of_sets, number_of_sets);
> @@ -314,6 +315,7 @@ static ssize_t write_policy_show(struct device *dev,
>  	return n;
>  }
>  
> +static DEVICE_ATTR_RO(id);
>  static DEVICE_ATTR_RO(level);
>  static DEVICE_ATTR_RO(type);
>  static DEVICE_ATTR_RO(coherency_line_size);
> @@ -327,6 +329,7 @@ static DEVICE_ATTR_RO(shared_cpu_list);
>  static DEVICE_ATTR_RO(physical_line_partition);
>  
>  static struct attribute *cache_default_attrs[] = {
> +	&dev_attr_id.attr,
>  	&dev_attr_type.attr,
>  	&dev_attr_level.attr,
>  	&dev_attr_shared_cpu_map.attr,
> @@ -350,6 +353,8 @@ cache_default_attrs_is_visible(struct kobject *kobj,
>  	const struct cpumask *mask = &this_leaf->shared_cpu_map;
>  	umode_t mode = attr->mode;
>  
> +	if ((attr == &dev_attr_id.attr) && this_leaf->attributes & CACHE_ID)
> +		return mode;
>  	if ((attr == &dev_attr_type.attr) && this_leaf->type)
>  		return mode;
>  	if ((attr == &dev_attr_level.attr) && this_leaf->level)
> diff --git a/include/linux/cacheinfo.h b/include/linux/cacheinfo.h
> index 2189935..16e5573 100644
> --- a/include/linux/cacheinfo.h
> +++ b/include/linux/cacheinfo.h
> @@ -18,6 +18,7 @@ enum cache_type {
>  
>  /**
>   * struct cacheinfo - represent a cache leaf node
> + * @id: id of this cache node. This is unique id across the platform.

So you need to explain what a "cache node" is. Especially since this is
generic code and other arches might not necessarily have a notion of a
"cache node" - whatever that is.

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

-- 
Regards/Gruss,
    Boris.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] cacheinfo: Introduce cache id
  2016-07-01 10:21 ` Borislav Petkov
@ 2016-07-01 16:50   ` Luck, Tony
  2016-07-01 17:27     ` Borislav Petkov
  0 siblings, 1 reply; 15+ messages in thread
From: Luck, Tony @ 2016-07-01 16:50 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Fenghua Yu, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Peter Zijlstra, Stephane Eranian, Ravi V Shankar, Vikas Shivappa,
	linux-kernel, x86

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] cacheinfo: Introduce cache id
  2016-07-01 16:50   ` Luck, Tony
@ 2016-07-01 17:27     ` Borislav Petkov
  2016-07-01 18:00       ` Luck, Tony
  2016-07-01 18:01       ` Yu, Fenghua
  0 siblings, 2 replies; 15+ messages in thread
From: Borislav Petkov @ 2016-07-01 17:27 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Fenghua Yu, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Peter Zijlstra, Stephane Eranian, Ravi V Shankar, Vikas Shivappa,
	linux-kernel, x86

On Fri, Jul 01, 2016 at 09:50:41AM -0700, Luck, Tony wrote:
> 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.

Right, so I'm presuming we don't want to make it special to the LLC but
be generic and have any cache level have an ID.

And, since we simply call it cache, how about we drop the "node" thing
and simply talk about cache and it having an ID. We say it is unique on
the system and the cache with ID X is local to only thread X and the
cache with ID Y is shared by threads Y_0, ... Y_k. And so on...

How does that sound?

Struct doc will have then:

 /**
  * struct cacheinfo - represent a cache leaf node
+ * @id: This cache's ID. ID is unique on the platform.

?

which begs the question, does get_cache_id() give unique IDs for all
caches in the hierarchy on the system?

Because I tried this patch quickly in kvm and it was of course wrong but
it hints at that important question:

cpu0/cache/index0/id:0
cpu0/cache/index1/id:0
cpu0/cache/index2/id:0
cpu1/cache/index0/id:1
cpu1/cache/index1/id:1
cpu1/cache/index2/id:1
cpu2/cache/index0/id:2
cpu2/cache/index1/id:2
cpu2/cache/index2/id:2
cpu3/cache/index0/id:3
cpu3/cache/index1/id:3
cpu3/cache/index2/id:3
cpu4/cache/index0/id:4
cpu4/cache/index1/id:4
cpu4/cache/index2/id:4
cpu5/cache/index0/id:5
cpu5/cache/index1/id:5
cpu5/cache/index2/id:5
cpu6/cache/index0/id:6
cpu6/cache/index1/id:6
cpu6/cache/index2/id:6
cpu7/cache/index0/id:7
cpu7/cache/index1/id:7
cpu7/cache/index2/id:7

Basically all cache indices carry the APIC ID of the core, so L1D on
CPU0 has ID 0 and then L1I has ID 0 too and then L2 has also the same
ID.

How does that look on a CAT system? Do all the different cache levels
get different IDs?

Thanks.

-- 
Regards/Gruss,
    Boris.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] cacheinfo: Introduce cache id
  2016-07-01 17:27     ` Borislav Petkov
@ 2016-07-01 18:00       ` Luck, Tony
  2016-07-01 18:29         ` Borislav Petkov
  2016-07-01 18:01       ` Yu, Fenghua
  1 sibling, 1 reply; 15+ messages in thread
From: Luck, Tony @ 2016-07-01 18:00 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Fenghua Yu, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Peter Zijlstra, Stephane Eranian, Ravi V Shankar, Vikas Shivappa,
	linux-kernel, x86

> Basically all cache indices carry the APIC ID of the core, so L1D on
> CPU0 has ID 0 and then L1I has ID 0 too and then L2 has also the same
> ID.
> 
> How does that look on a CAT system? Do all the different cache levels
> get different IDs?

For CAT we only need the IDs to be unique at each level. Our tentative
syntax for the schema file for CAT looks like this (for a theoretical
system supporting CAT in both L2 and L3 with two L3 caches and eight L2 caches)

L3:id0=fff;id1=ff0
L2:id0=3;id1=c;id2=30;id3=c0;id4=3;id5=c;id6=30;id7=c0

We wondered about using cpu numbers (i.e. when we say id0 on the "L3"
line we mean the L3 cache that is used by cpu0 (and a bunch of other
cpus) and on the L2 line it means the L2 cache shared by cpu0 (and its
hyperthread core buddy).  But that gets weird with hot plug. cpu0 may
be offline, but the caches it shares still exist.

-Tony

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH] cacheinfo: Introduce cache id
  2016-07-01 17:27     ` Borislav Petkov
  2016-07-01 18:00       ` Luck, Tony
@ 2016-07-01 18:01       ` Yu, Fenghua
  2016-07-01 18:35         ` Borislav Petkov
  1 sibling, 1 reply; 15+ messages in thread
From: Yu, Fenghua @ 2016-07-01 18:01 UTC (permalink / raw)
  To: Borislav Petkov, Luck, Tony
  Cc: Thomas Gleixner, Ingo Molnar, Anvin, H Peter, Peter Zijlstra,
	Stephane Eranian, Shankar, Ravi V, Vikas Shivappa, linux-kernel,
	x86

> From: Borislav Petkov [mailto:bp@suse.de]
> Sent: Friday, July 01, 2016 10:28 AM
> To: Luck, Tony <tony.luck@intel.com>
> Cc: Yu, Fenghua <fenghua.yu@intel.com>; Thomas Gleixner
> <tglx@linutronix.de>; Ingo Molnar <mingo@elte.hu>; Anvin, H Peter
> <h.peter.anvin@intel.com>; Peter Zijlstra <peterz@infradead.org>;
> Stephane Eranian <eranian@google.com>; Shankar, Ravi V
> <ravi.v.shankar@intel.com>; Vikas Shivappa
> <vikas.shivappa@linux.intel.com>; linux-kernel <linux-
> kernel@vger.kernel.org>; x86 <x86@kernel.org>
> Subject: Re: [PATCH] cacheinfo: Introduce cache id
> 
> On Fri, Jul 01, 2016 at 09:50:41AM -0700, Luck, Tony wrote:
> > 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.
> 
> Right, so I'm presuming we don't want to make it special to the LLC but be
> generic and have any cache level have an ID.
> 
> And, since we simply call it cache, how about we drop the "node" thing and
> simply talk about cache and it having an ID. We say it is unique on the system
> and the cache with ID X is local to only thread X and the cache with ID Y is
> shared by threads Y_0, ... Y_k. And so on...
> 
> How does that sound?

That's good for me.

> 
> Struct doc will have then:
> 
>  /**
>   * struct cacheinfo - represent a cache leaf node
> + * @id: This cache's ID. ID is unique on the platform.
> 
> ?
> 
> which begs the question, does get_cache_id() give unique IDs for all caches
> in the hierarchy on the system?

Cache id is unique on the same level of cache across platform.

> 
> Because I tried this patch quickly in kvm and it was of course wrong but it
> hints at that important question:
> 
> cpu0/cache/index0/id:0b
> cpu0/cache/index1/id:0
> cpu0/cache/index2/id:0
> cpu1/cache/index0/id:1
> cpu1/cache/index1/id:1
> cpu1/cache/index2/id:1
> cpu2/cache/index0/id:2
> cpu2/cache/index1/id:2
> cpu2/cache/index2/id:2
> cpu3/cache/index0/id:3
> cpu3/cache/index1/id:3
> cpu3/cache/index2/id:3
> cpu4/cache/index0/id:4
> cpu4/cache/index1/id:4
> cpu4/cache/index2/id:4
> cpu5/cache/index0/id:5
> cpu5/cache/index1/id:5
> cpu5/cache/index2/id:5
> cpu6/cache/index0/id:6
> cpu6/cache/index1/id:6
> cpu6/cache/index2/id:6
> cpu7/cache/index0/id:7
> cpu7/cache/index1/id:7
> cpu7/cache/index2/id:7
> 
> Basically all cache indices carry the APIC ID of the core, so L1D on
> CPU0 has ID 0 and then L1I has ID 0 too and then L2 has also the same ID.

The cache id should represent shared cpus on one cache level according to SDM.

Could you check cpu#/cache/index#/shared_cpu_map or shared_cpu_list.
According to the cache id, there is NO shared cpu on each level. The shared_cpu_map
In your KVM should tell that as well, I think. I would guess all shared_cpu_map in each cache level on each cpu has itself on your KVM.

> 
> How does that look on a CAT system? Do all the different cache levels get
> different IDs?

On my Broadwell EP, the cache id info is as follows:

>From index3/id, there are 2 cache ids for L3.
L3 cache id 0 has shared_cpu_map: 00,003ffff0,0003ffff
L3 cache id 1 has shared_cpu_map: ff,ffc0000f,fffc0000
Similar for L2 and L1.

Cache id is unique on the same level across platform.

#find /sys/device/system/cpu/. -name id|xargs cat
0
0
0
0
1
1
1
0
2
2
2
0
3
3
3
0
4
4
4
0
8
8
8
0
9
9
9
0
10
10
10
0
11
11
11
0
16
16
16
0
17
17
17
0
18
18
18
0
19
19
19
0
20
20
20
0
24
24
24
0
25
25
25
0
26
26
26
0
27
27
27
0
32
32
32
1
33
33
33
1
34
34
34
1
35
35
35
1
36
36
36
1
40
40
40
1
41
41
41
1
42
42
42
1
43
43
43
1
48
48
48
1
49
49
49
1
50
50
50
1
51
51
51
1
52
52
52
1
56
56
56
1
57
57
57
1
58
58
58
1
59
59
59
1
0
0
0
0
1
1
1
0
2
2
2
0
3
3
3
0
4
4
4
0
8
8
8
0
9
9
9
0
10
10
10
0
11
11
11
0
16
16
16
0
17
17
17
0
18
18
18
0
19
19
19
0
20
20
20
0
24
24
24
0
25
25
25
0
26
26
26
0
27
27
27
0
32
32
32
1
33
33
33
1
34
34
34
1
35
35
35
1
36
36
36
1
40
40
40
1
41
41
41
1
42
42
42
1
43
43
43
1
48
48
48
1
49
49
49
1
50
50
50
1
51
51
51
1
52
52
52
1
56
56
56
1
57
57
57
1
58
58
58
1
59
59
59
1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] cacheinfo: Introduce cache id
  2016-07-01 18:00       ` Luck, Tony
@ 2016-07-01 18:29         ` Borislav Petkov
  2016-07-01 18:32           ` Yu, Fenghua
  0 siblings, 1 reply; 15+ messages in thread
From: Borislav Petkov @ 2016-07-01 18:29 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Fenghua Yu, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Peter Zijlstra, Stephane Eranian, Ravi V Shankar, Vikas Shivappa,
	linux-kernel, x86

On Fri, Jul 01, 2016 at 11:00:35AM -0700, Luck, Tony wrote:
> For CAT we only need the IDs to be unique at each level. Our tentative
> syntax for the schema file for CAT looks like this (for a theoretical
> system supporting CAT in both L2 and L3 with two L3 caches and eight L2 caches)
> 
> L3:id0=fff;id1=ff0
> L2:id0=3;id1=c;id2=30;id3=c0;id4=3;id5=c;id6=30;id7=c0

So wouldn't it be straightforward and natural to do the following
nomenclature (which basically suggests itself):

ID<level>.<num>

?

So that the ID hierarchy above is:

ID3.0 ID3.1
ID2.0 ID2.1 ID2.2 ID2.3 ... ID2.7

I don't know if that's useful though.

I mean, we have that info in the path anyway:

/sys/devices/system/cpu/cpu0/cache/index3/id = 0xfff
...

and so on.

Whatever you do, as long as the nomenclature is documented somewhere,
say Documentation/x86/topology.txt, for example, we should be fine.

-- 
Regards/Gruss,
    Boris.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH] cacheinfo: Introduce cache id
  2016-07-01 18:29         ` Borislav Petkov
@ 2016-07-01 18:32           ` Yu, Fenghua
  2016-07-01 18:40             ` Borislav Petkov
  0 siblings, 1 reply; 15+ messages in thread
From: Yu, Fenghua @ 2016-07-01 18:32 UTC (permalink / raw)
  To: Borislav Petkov, Luck, Tony
  Cc: Thomas Gleixner, Ingo Molnar, Anvin, H Peter, Peter Zijlstra,
	Stephane Eranian, Shankar, Ravi V, Vikas Shivappa, linux-kernel,
	x86

> From: Borislav Petkov [mailto:bp@suse.de]
> Sent: Friday, July 01, 2016 11:29 AM
> To: Luck, Tony <tony.luck@intel.com>
> Cc: Yu, Fenghua <fenghua.yu@intel.com>; Thomas Gleixner
> <tglx@linutronix.de>; Ingo Molnar <mingo@elte.hu>; Anvin, H Peter
> <h.peter.anvin@intel.com>; Peter Zijlstra <peterz@infradead.org>;
> Stephane Eranian <eranian@google.com>; Shankar, Ravi V
> <ravi.v.shankar@intel.com>; Vikas Shivappa
> <vikas.shivappa@linux.intel.com>; linux-kernel <linux-
> kernel@vger.kernel.org>; x86 <x86@kernel.org>
> Subject: Re: [PATCH] cacheinfo: Introduce cache id
> 
> On Fri, Jul 01, 2016 at 11:00:35AM -0700, Luck, Tony wrote:
> > For CAT we only need the IDs to be unique at each level. Our tentative
> > syntax for the schema file for CAT looks like this (for a theoretical
> > system supporting CAT in both L2 and L3 with two L3 caches and eight
> > L2 caches)
> >
> > L3:id0=fff;id1=ff0
> > L2:id0=3;id1=c;id2=30;id3=c0;id4=3;id5=c;id6=30;id7=c0
> 
> So wouldn't it be straightforward and natural to do the following
> nomenclature (which basically suggests itself):
> 
> ID<level>.<num>

We has prefix "L3" or "L2" in the syntax, id is for that level in each line.b

> 
> ?
> 
> So that the ID hierarchy above is:
> 
> ID3.0 ID3.1
> ID2.0 ID2.1 ID2.2 ID2.3 ... ID2.7
> 
> I don't know if that's useful though.
> 
> I mean, we have that info in the path anyway:
> 
> /sys/devices/system/cpu/cpu0/cache/index3/id = 0xfff ...
> 
> and so on.
> 
> Whatever you do, as long as the nomenclature is documented somewhere,
> say Documentation/x86/topology.txt, for example, we should be fine.
> 
> --
> Regards/Gruss,
>     Boris.
> 
> SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton,
> HRB 21284 (AG Nürnberg)
> --

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] cacheinfo: Introduce cache id
  2016-07-01 18:01       ` Yu, Fenghua
@ 2016-07-01 18:35         ` Borislav Petkov
  2016-07-01 19:24           ` Yu, Fenghua
  0 siblings, 1 reply; 15+ messages in thread
From: Borislav Petkov @ 2016-07-01 18:35 UTC (permalink / raw)
  To: Yu, Fenghua
  Cc: Luck, Tony, Thomas Gleixner, Ingo Molnar, Anvin, H Peter,
	Peter Zijlstra, Stephane Eranian, Shankar, Ravi V,
	Vikas Shivappa, linux-kernel, x86

On Fri, Jul 01, 2016 at 06:01:06PM +0000, Yu, Fenghua wrote:
> Cache id is unique on the same level of cache across platform.

Btw, I forgot to ask in the reply to Tony: how are those cache IDs
exactly going to be used? An example please...

> Could you check cpu#/cache/index#/shared_cpu_map or shared_cpu_list.

Bah, my kvm is on an AMD guest - forget what it says :-)

> Cache id is unique on the same level across platform.
> 
> #find /sys/device/system/cpu/. -name id|xargs cat

Btw, you could do

grep . /sys/devices/system/cpu/cpu*/cache/index*/id

and it'll give you the absolute filepaths too, so that the output is
parseable easier.

-- 
Regards/Gruss,
    Boris.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] cacheinfo: Introduce cache id
  2016-07-01 18:32           ` Yu, Fenghua
@ 2016-07-01 18:40             ` Borislav Petkov
  2016-07-01 19:08               ` Yu, Fenghua
  0 siblings, 1 reply; 15+ messages in thread
From: Borislav Petkov @ 2016-07-01 18:40 UTC (permalink / raw)
  To: Yu, Fenghua
  Cc: Luck, Tony, Thomas Gleixner, Ingo Molnar, Anvin, H Peter,
	Peter Zijlstra, Stephane Eranian, Shankar, Ravi V,
	Vikas Shivappa, linux-kernel, x86

On Fri, Jul 01, 2016 at 06:32:19PM +0000, Yu, Fenghua wrote:
> We has prefix "L3" or "L2" in the syntax, id is for that level in each line.b

Give me a full example, please, how the id is going to be used.

Thanks.

-- 
Regards/Gruss,
    Boris.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH] cacheinfo: Introduce cache id
  2016-07-01 18:40             ` Borislav Petkov
@ 2016-07-01 19:08               ` Yu, Fenghua
  2016-07-04 17:29                 ` Borislav Petkov
  0 siblings, 1 reply; 15+ messages in thread
From: Yu, Fenghua @ 2016-07-01 19:08 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Luck, Tony, Thomas Gleixner, Ingo Molnar, Anvin, H Peter,
	Peter Zijlstra, Stephane Eranian, Shankar, Ravi V,
	Vikas Shivappa, linux-kernel, x86

> From: Borislav Petkov [mailto:bp@suse.de]
> Sent: Friday, July 01, 2016 11:40 AM
> On Fri, Jul 01, 2016 at 06:32:19PM +0000, Yu, Fenghua wrote:
> > We has prefix "L3" or "L2" in the syntax, id is for that level in each line.b
> 
> Give me a full example, please, how the id is going to be used.

Intel Cache Allocation Technology allows app to use only portion of L2 or L3 cache. Each cache has its own allocation MSR registers array which contains CBM (Cache Bit Mask) to specify which part of cache is allocated.

We have a user interface to allow user to input CBM bits to a specific cache MSR register array. In current kernel, there is no identification of the cache. So we propose the cache id to identify the cache.

So CAT user interface is called schemas which have multiple lines. Each line describes one cache allocation CBM (or schema).

For L3 schema on a two socket system which has two L3 caches, user input:
L3:0=3;1=f
That means user wants to allocate CBM 3 on L3 id 0 and CBM f on L3 id 1. Kernel gets this info and writes CBM 3 to one MSR register on the L3 cache with cache id 0 and write CBM f to one MSR register on another L3 cache with cache id 1.

User can allow a task to use this schema. When the task is running on a CPU that shares the L3 cache of cache id 0, the CBM 3 is used (via another PQR_MSR register pointing to the CBM) and a portion of the L3 of cache id 0 is allocated to the task and task can only uses that portion. When the task is scheduled on a CPU that shares the L3 cache of cache id 1, the CBM f is used and a portion of the L3 of cache id 1 is allocated to the task for use.

The current kernel has store cache info in cacheinfo structure and each cacheinfo eventually is exported in /sys/device/system/cpu/cpu#/cache/index#/. BUT....there is no existing identification methodology to allow user to specify a cache. CAT wants to allow user to use one id to specify which cache. That's the reason we propose the cache id in the patch.

Please note, socket# and core# and combination of them can not be used to identify a cache architecturally. A lot of machines have L3 per socket and L2 per core. BUT architecturally one socket can have more than one L3 and L2 can be shared by more than one core.

Thanks.

-Fenghua

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH] cacheinfo: Introduce cache id
  2016-07-01 18:35         ` Borislav Petkov
@ 2016-07-01 19:24           ` Yu, Fenghua
  2016-07-04 17:58             ` Borislav Petkov
  0 siblings, 1 reply; 15+ messages in thread
From: Yu, Fenghua @ 2016-07-01 19:24 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Luck, Tony, Thomas Gleixner, Ingo Molnar, Anvin, H Peter,
	Peter Zijlstra, Stephane Eranian, Shankar, Ravi V,
	Vikas Shivappa, linux-kernel, x86


> From: Borislav Petkov [mailto:bp@suse.de]
> Sent: Friday, July 01, 2016 11:36 AM
> To: Yu, Fenghua <fenghua.yu@intel.com>
> Cc: Luck, Tony <tony.luck@intel.com>; Thomas Gleixner
> <tglx@linutronix.de>; Ingo Molnar <mingo@elte.hu>; Anvin, H Peter
> <h.peter.anvin@intel.com>; Peter Zijlstra <peterz@infradead.org>;
> Stephane Eranian <eranian@google.com>; Shankar, Ravi V
> <ravi.v.shankar@intel.com>; Vikas Shivappa
> <vikas.shivappa@linux.intel.com>; linux-kernel <linux-
> kernel@vger.kernel.org>; x86 <x86@kernel.org>
> Subject: Re: [PATCH] cacheinfo: Introduce cache id
> 
> On Fri, Jul 01, 2016 at 06:01:06PM +0000, Yu, Fenghua wrote:
> > Cache id is unique on the same level of cache across platform.
> 
> Btw, I forgot to ask in the reply to Tony: how are those cache IDs exactly
> going to be used? An example please...
> 
> > Could you check cpu#/cache/index#/shared_cpu_map or shared_cpu_list.
> 
> Bah, my kvm is on an AMD guest - forget what it says :-)

I haven't tested on AMD. But I think AMD should have the same code.

Could you please check if /sys/device/system/cpu/cpu#/cache/index#/shared_cpu_map contains only the cpu itself? From the cache id you dump on KVM, it tells there are 8 cache leaf 0, 8 cache leaf 1, and 8 cache leaf 2. That means each CPU has its own 3 caches (I can't tell from the cache id which level they are. The cache/index#/level will tell that).

If this is not the case, maybe cache id doesn't work on AMD. Maybe I don't enable cache id for AMD?

> 
> > Cache id is unique on the same level across platform.
> >
> > #find /sys/device/system/cpu/. -name id|xargs cat
> 
> Btw, you could do
> 
> grep . /sys/devices/system/cpu/cpu*/cache/index*/id
> 
> and it'll give you the absolute filepaths too, so that the output is parseable
> easier.

Thanks for the command. Here is more nicer info:)

>From the info, cache id on one level is unique on that level across the board.

/sys/devices/system/cpu/cpu0/cache/index0/id:0
/sys/devices/system/cpu/cpu0/cache/index1/id:0
/sys/devices/system/cpu/cpu0/cache/index2/id:0
/sys/devices/system/cpu/cpu0/cache/index3/id:0
/sys/devices/system/cpu/cpu10/cache/index0/id:17
/sys/devices/system/cpu/cpu10/cache/index1/id:17
/sys/devices/system/cpu/cpu10/cache/index2/id:17
/sys/devices/system/cpu/cpu10/cache/index3/id:0
/sys/devices/system/cpu/cpu11/cache/index0/id:18
/sys/devices/system/cpu/cpu11/cache/index1/id:18
/sys/devices/system/cpu/cpu11/cache/index2/id:18
/sys/devices/system/cpu/cpu11/cache/index3/id:0
/sys/devices/system/cpu/cpu12/cache/index0/id:19
/sys/devices/system/cpu/cpu12/cache/index1/id:19
/sys/devices/system/cpu/cpu12/cache/index2/id:19
/sys/devices/system/cpu/cpu12/cache/index3/id:0
/sys/devices/system/cpu/cpu13/cache/index0/id:20
/sys/devices/system/cpu/cpu13/cache/index1/id:20
/sys/devices/system/cpu/cpu13/cache/index2/id:20
/sys/devices/system/cpu/cpu13/cache/index3/id:0
/sys/devices/system/cpu/cpu14/cache/index0/id:24
/sys/devices/system/cpu/cpu14/cache/index1/id:24
/sys/devices/system/cpu/cpu14/cache/index2/id:24
/sys/devices/system/cpu/cpu14/cache/index3/id:0
/sys/devices/system/cpu/cpu15/cache/index0/id:25
/sys/devices/system/cpu/cpu15/cache/index1/id:25
/sys/devices/system/cpu/cpu15/cache/index2/id:25
/sys/devices/system/cpu/cpu15/cache/index3/id:0
/sys/devices/system/cpu/cpu16/cache/index0/id:26
/sys/devices/system/cpu/cpu16/cache/index1/id:26
/sys/devices/system/cpu/cpu16/cache/index2/id:26
/sys/devices/system/cpu/cpu16/cache/index3/id:0
/sys/devices/system/cpu/cpu17/cache/index0/id:27
/sys/devices/system/cpu/cpu17/cache/index1/id:27
/sys/devices/system/cpu/cpu17/cache/index2/id:27
/sys/devices/system/cpu/cpu17/cache/index3/id:0
/sys/devices/system/cpu/cpu18/cache/index0/id:32
/sys/devices/system/cpu/cpu18/cache/index1/id:32
/sys/devices/system/cpu/cpu18/cache/index2/id:32
/sys/devices/system/cpu/cpu18/cache/index3/id:1
/sys/devices/system/cpu/cpu19/cache/index0/id:33
/sys/devices/system/cpu/cpu19/cache/index1/id:33
/sys/devices/system/cpu/cpu19/cache/index2/id:33
/sys/devices/system/cpu/cpu19/cache/index3/id:1
/sys/devices/system/cpu/cpu1/cache/index0/id:1
/sys/devices/system/cpu/cpu1/cache/index1/id:1
/sys/devices/system/cpu/cpu1/cache/index2/id:1
/sys/devices/system/cpu/cpu1/cache/index3/id:0
/sys/devices/system/cpu/cpu20/cache/index0/id:34
/sys/devices/system/cpu/cpu20/cache/index1/id:34
/sys/devices/system/cpu/cpu20/cache/index2/id:34
/sys/devices/system/cpu/cpu20/cache/index3/id:1
/sys/devices/system/cpu/cpu21/cache/index0/id:35
/sys/devices/system/cpu/cpu21/cache/index1/id:35
/sys/devices/system/cpu/cpu21/cache/index2/id:35
/sys/devices/system/cpu/cpu21/cache/index3/id:1
/sys/devices/system/cpu/cpu22/cache/index0/id:36
/sys/devices/system/cpu/cpu22/cache/index1/id:36
/sys/devices/system/cpu/cpu22/cache/index2/id:36
/sys/devices/system/cpu/cpu22/cache/index3/id:1
/sys/devices/system/cpu/cpu23/cache/index0/id:40
/sys/devices/system/cpu/cpu23/cache/index1/id:40
/sys/devices/system/cpu/cpu23/cache/index2/id:40
/sys/devices/system/cpu/cpu23/cache/index3/id:1
/sys/devices/system/cpu/cpu24/cache/index0/id:41
/sys/devices/system/cpu/cpu24/cache/index1/id:41
/sys/devices/system/cpu/cpu24/cache/index2/id:41
/sys/devices/system/cpu/cpu24/cache/index3/id:1
/sys/devices/system/cpu/cpu25/cache/index0/id:42
/sys/devices/system/cpu/cpu25/cache/index1/id:42
/sys/devices/system/cpu/cpu25/cache/index2/id:42
/sys/devices/system/cpu/cpu25/cache/index3/id:1
/sys/devices/system/cpu/cpu26/cache/index0/id:43
/sys/devices/system/cpu/cpu26/cache/index1/id:43
/sys/devices/system/cpu/cpu26/cache/index2/id:43
/sys/devices/system/cpu/cpu26/cache/index3/id:1
/sys/devices/system/cpu/cpu27/cache/index0/id:48
/sys/devices/system/cpu/cpu27/cache/index1/id:48
/sys/devices/system/cpu/cpu27/cache/index2/id:48
/sys/devices/system/cpu/cpu27/cache/index3/id:1
/sys/devices/system/cpu/cpu28/cache/index0/id:49
/sys/devices/system/cpu/cpu28/cache/index1/id:49
/sys/devices/system/cpu/cpu28/cache/index2/id:49
/sys/devices/system/cpu/cpu28/cache/index3/id:1
/sys/devices/system/cpu/cpu29/cache/index0/id:50
/sys/devices/system/cpu/cpu29/cache/index1/id:50
/sys/devices/system/cpu/cpu29/cache/index2/id:50
/sys/devices/system/cpu/cpu29/cache/index3/id:1
/sys/devices/system/cpu/cpu2/cache/index0/id:2
/sys/devices/system/cpu/cpu2/cache/index1/id:2
/sys/devices/system/cpu/cpu2/cache/index2/id:2
/sys/devices/system/cpu/cpu2/cache/index3/id:0
/sys/devices/system/cpu/cpu30/cache/index0/id:51
/sys/devices/system/cpu/cpu30/cache/index1/id:51
/sys/devices/system/cpu/cpu30/cache/index2/id:51
/sys/devices/system/cpu/cpu30/cache/index3/id:1
/sys/devices/system/cpu/cpu31/cache/index0/id:52
/sys/devices/system/cpu/cpu31/cache/index1/id:52
/sys/devices/system/cpu/cpu31/cache/index2/id:52
/sys/devices/system/cpu/cpu31/cache/index3/id:1
/sys/devices/system/cpu/cpu32/cache/index0/id:56
/sys/devices/system/cpu/cpu32/cache/index1/id:56
/sys/devices/system/cpu/cpu32/cache/index2/id:56
/sys/devices/system/cpu/cpu32/cache/index3/id:1
/sys/devices/system/cpu/cpu33/cache/index0/id:57
/sys/devices/system/cpu/cpu33/cache/index1/id:57
/sys/devices/system/cpu/cpu33/cache/index2/id:57
/sys/devices/system/cpu/cpu33/cache/index3/id:1
/sys/devices/system/cpu/cpu34/cache/index0/id:58
/sys/devices/system/cpu/cpu34/cache/index1/id:58
/sys/devices/system/cpu/cpu34/cache/index2/id:58
/sys/devices/system/cpu/cpu34/cache/index3/id:1
/sys/devices/system/cpu/cpu35/cache/index0/id:59
/sys/devices/system/cpu/cpu35/cache/index1/id:59
/sys/devices/system/cpu/cpu35/cache/index2/id:59
/sys/devices/system/cpu/cpu35/cache/index3/id:1
/sys/devices/system/cpu/cpu36/cache/index0/id:0
/sys/devices/system/cpu/cpu36/cache/index1/id:0
/sys/devices/system/cpu/cpu36/cache/index2/id:0
/sys/devices/system/cpu/cpu36/cache/index3/id:0
/sys/devices/system/cpu/cpu37/cache/index0/id:1
/sys/devices/system/cpu/cpu37/cache/index1/id:1
/sys/devices/system/cpu/cpu37/cache/index2/id:1
/sys/devices/system/cpu/cpu37/cache/index3/id:0
/sys/devices/system/cpu/cpu38/cache/index0/id:2
/sys/devices/system/cpu/cpu38/cache/index1/id:2
/sys/devices/system/cpu/cpu38/cache/index2/id:2
/sys/devices/system/cpu/cpu38/cache/index3/id:0
/sys/devices/system/cpu/cpu39/cache/index0/id:3
/sys/devices/system/cpu/cpu39/cache/index1/id:3
/sys/devices/system/cpu/cpu39/cache/index2/id:3
/sys/devices/system/cpu/cpu39/cache/index3/id:0
/sys/devices/system/cpu/cpu3/cache/index0/id:3
/sys/devices/system/cpu/cpu3/cache/index1/id:3
/sys/devices/system/cpu/cpu3/cache/index2/id:3
/sys/devices/system/cpu/cpu3/cache/index3/id:0
/sys/devices/system/cpu/cpu40/cache/index0/id:4
/sys/devices/system/cpu/cpu40/cache/index1/id:4
/sys/devices/system/cpu/cpu40/cache/index2/id:4
/sys/devices/system/cpu/cpu40/cache/index3/id:0
/sys/devices/system/cpu/cpu41/cache/index0/id:8
/sys/devices/system/cpu/cpu41/cache/index1/id:8
/sys/devices/system/cpu/cpu41/cache/index2/id:8
/sys/devices/system/cpu/cpu41/cache/index3/id:0
/sys/devices/system/cpu/cpu42/cache/index0/id:9
/sys/devices/system/cpu/cpu42/cache/index1/id:9
/sys/devices/system/cpu/cpu42/cache/index2/id:9
/sys/devices/system/cpu/cpu42/cache/index3/id:0
/sys/devices/system/cpu/cpu43/cache/index0/id:10
/sys/devices/system/cpu/cpu43/cache/index1/id:10
/sys/devices/system/cpu/cpu43/cache/index2/id:10
/sys/devices/system/cpu/cpu43/cache/index3/id:0
/sys/devices/system/cpu/cpu44/cache/index0/id:11
/sys/devices/system/cpu/cpu44/cache/index1/id:11
/sys/devices/system/cpu/cpu44/cache/index2/id:11
/sys/devices/system/cpu/cpu44/cache/index3/id:0
/sys/devices/system/cpu/cpu45/cache/index0/id:16
/sys/devices/system/cpu/cpu45/cache/index1/id:16
/sys/devices/system/cpu/cpu45/cache/index2/id:16
/sys/devices/system/cpu/cpu45/cache/index3/id:0
/sys/devices/system/cpu/cpu46/cache/index0/id:17
/sys/devices/system/cpu/cpu46/cache/index1/id:17
/sys/devices/system/cpu/cpu46/cache/index2/id:17
/sys/devices/system/cpu/cpu46/cache/index3/id:0
/sys/devices/system/cpu/cpu47/cache/index0/id:18
/sys/devices/system/cpu/cpu47/cache/index1/id:18
/sys/devices/system/cpu/cpu47/cache/index2/id:18
/sys/devices/system/cpu/cpu47/cache/index3/id:0
/sys/devices/system/cpu/cpu48/cache/index0/id:19
/sys/devices/system/cpu/cpu48/cache/index1/id:19
/sys/devices/system/cpu/cpu48/cache/index2/id:19
/sys/devices/system/cpu/cpu48/cache/index3/id:0
/sys/devices/system/cpu/cpu49/cache/index0/id:20
/sys/devices/system/cpu/cpu49/cache/index1/id:20
/sys/devices/system/cpu/cpu49/cache/index2/id:20
/sys/devices/system/cpu/cpu49/cache/index3/id:0
/sys/devices/system/cpu/cpu4/cache/index0/id:4
/sys/devices/system/cpu/cpu4/cache/index1/id:4
/sys/devices/system/cpu/cpu4/cache/index2/id:4
/sys/devices/system/cpu/cpu4/cache/index3/id:0
/sys/devices/system/cpu/cpu50/cache/index0/id:24
/sys/devices/system/cpu/cpu50/cache/index1/id:24
/sys/devices/system/cpu/cpu50/cache/index2/id:24
/sys/devices/system/cpu/cpu50/cache/index3/id:0
/sys/devices/system/cpu/cpu51/cache/index0/id:25
/sys/devices/system/cpu/cpu51/cache/index1/id:25
/sys/devices/system/cpu/cpu51/cache/index2/id:25
/sys/devices/system/cpu/cpu51/cache/index3/id:0
/sys/devices/system/cpu/cpu52/cache/index0/id:26
/sys/devices/system/cpu/cpu52/cache/index1/id:26
/sys/devices/system/cpu/cpu52/cache/index2/id:26
/sys/devices/system/cpu/cpu52/cache/index3/id:0
/sys/devices/system/cpu/cpu53/cache/index0/id:27
/sys/devices/system/cpu/cpu53/cache/index1/id:27
/sys/devices/system/cpu/cpu53/cache/index2/id:27
/sys/devices/system/cpu/cpu53/cache/index3/id:0
/sys/devices/system/cpu/cpu54/cache/index0/id:32
/sys/devices/system/cpu/cpu54/cache/index1/id:32
/sys/devices/system/cpu/cpu54/cache/index2/id:32
/sys/devices/system/cpu/cpu54/cache/index3/id:1
/sys/devices/system/cpu/cpu55/cache/index0/id:33
/sys/devices/system/cpu/cpu55/cache/index1/id:33
/sys/devices/system/cpu/cpu55/cache/index2/id:33
/sys/devices/system/cpu/cpu55/cache/index3/id:1
/sys/devices/system/cpu/cpu56/cache/index0/id:34
/sys/devices/system/cpu/cpu56/cache/index1/id:34
/sys/devices/system/cpu/cpu56/cache/index2/id:34
/sys/devices/system/cpu/cpu56/cache/index3/id:1
/sys/devices/system/cpu/cpu57/cache/index0/id:35
/sys/devices/system/cpu/cpu57/cache/index1/id:35
/sys/devices/system/cpu/cpu57/cache/index2/id:35
/sys/devices/system/cpu/cpu57/cache/index3/id:1
/sys/devices/system/cpu/cpu58/cache/index0/id:36
/sys/devices/system/cpu/cpu58/cache/index1/id:36
/sys/devices/system/cpu/cpu58/cache/index2/id:36
/sys/devices/system/cpu/cpu58/cache/index3/id:1
/sys/devices/system/cpu/cpu59/cache/index0/id:40
/sys/devices/system/cpu/cpu59/cache/index1/id:40
/sys/devices/system/cpu/cpu59/cache/index2/id:40
/sys/devices/system/cpu/cpu59/cache/index3/id:1
/sys/devices/system/cpu/cpu5/cache/index0/id:8
/sys/devices/system/cpu/cpu5/cache/index1/id:8
/sys/devices/system/cpu/cpu5/cache/index2/id:8
/sys/devices/system/cpu/cpu5/cache/index3/id:0
/sys/devices/system/cpu/cpu60/cache/index0/id:41
/sys/devices/system/cpu/cpu60/cache/index1/id:41
/sys/devices/system/cpu/cpu60/cache/index2/id:41
/sys/devices/system/cpu/cpu60/cache/index3/id:1
/sys/devices/system/cpu/cpu61/cache/index0/id:42
/sys/devices/system/cpu/cpu61/cache/index1/id:42
/sys/devices/system/cpu/cpu61/cache/index2/id:42
/sys/devices/system/cpu/cpu61/cache/index3/id:1
/sys/devices/system/cpu/cpu62/cache/index0/id:43
/sys/devices/system/cpu/cpu62/cache/index1/id:43
/sys/devices/system/cpu/cpu62/cache/index2/id:43
/sys/devices/system/cpu/cpu62/cache/index3/id:1
/sys/devices/system/cpu/cpu63/cache/index0/id:48
/sys/devices/system/cpu/cpu63/cache/index1/id:48
/sys/devices/system/cpu/cpu63/cache/index2/id:48
/sys/devices/system/cpu/cpu63/cache/index3/id:1
/sys/devices/system/cpu/cpu64/cache/index0/id:49
/sys/devices/system/cpu/cpu64/cache/index1/id:49
/sys/devices/system/cpu/cpu64/cache/index2/id:49
/sys/devices/system/cpu/cpu64/cache/index3/id:1
/sys/devices/system/cpu/cpu65/cache/index0/id:50
/sys/devices/system/cpu/cpu65/cache/index1/id:50
/sys/devices/system/cpu/cpu65/cache/index2/id:50
/sys/devices/system/cpu/cpu65/cache/index3/id:1
/sys/devices/system/cpu/cpu66/cache/index0/id:51
/sys/devices/system/cpu/cpu66/cache/index1/id:51
/sys/devices/system/cpu/cpu66/cache/index2/id:51
/sys/devices/system/cpu/cpu66/cache/index3/id:1
/sys/devices/system/cpu/cpu67/cache/index0/id:52
/sys/devices/system/cpu/cpu67/cache/index1/id:52
/sys/devices/system/cpu/cpu67/cache/index2/id:52
/sys/devices/system/cpu/cpu67/cache/index3/id:1
/sys/devices/system/cpu/cpu68/cache/index0/id:56
/sys/devices/system/cpu/cpu68/cache/index1/id:56
/sys/devices/system/cpu/cpu68/cache/index2/id:56
/sys/devices/system/cpu/cpu68/cache/index3/id:1
/sys/devices/system/cpu/cpu69/cache/index0/id:57
/sys/devices/system/cpu/cpu69/cache/index1/id:57
/sys/devices/system/cpu/cpu69/cache/index2/id:57
/sys/devices/system/cpu/cpu69/cache/index3/id:1
/sys/devices/system/cpu/cpu6/cache/index0/id:9
/sys/devices/system/cpu/cpu6/cache/index1/id:9
/sys/devices/system/cpu/cpu6/cache/index2/id:9
/sys/devices/system/cpu/cpu6/cache/index3/id:0
/sys/devices/system/cpu/cpu70/cache/index0/id:58
/sys/devices/system/cpu/cpu70/cache/index1/id:58
/sys/devices/system/cpu/cpu70/cache/index2/id:58
/sys/devices/system/cpu/cpu70/cache/index3/id:1
/sys/devices/system/cpu/cpu71/cache/index0/id:59
/sys/devices/system/cpu/cpu71/cache/index1/id:59
/sys/devices/system/cpu/cpu71/cache/index2/id:59
/sys/devices/system/cpu/cpu71/cache/index3/id:1
/sys/devices/system/cpu/cpu7/cache/index0/id:10
/sys/devices/system/cpu/cpu7/cache/index1/id:10
/sys/devices/system/cpu/cpu7/cache/index2/id:10
/sys/devices/system/cpu/cpu7/cache/index3/id:0
/sys/devices/system/cpu/cpu8/cache/index0/id:11
/sys/devices/system/cpu/cpu8/cache/index1/id:11
/sys/devices/system/cpu/cpu8/cache/index2/id:11
/sys/devices/system/cpu/cpu8/cache/index3/id:0
/sys/devices/system/cpu/cpu9/cache/index0/id:16
/sys/devices/system/cpu/cpu9/cache/index1/id:16
/sys/devices/system/cpu/cpu9/cache/index2/id:16
/sys/devices/system/cpu/cpu9/cache/index3/id:0


/sys/devices/system/cpu/cpu0/cache/index0/shared_cpu_list:0,36
/sys/devices/system/cpu/cpu0/cache/index1/shared_cpu_list:0,36
/sys/devices/system/cpu/cpu0/cache/index2/shared_cpu_list:0,36
/sys/devices/system/cpu/cpu0/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu10/cache/index0/shared_cpu_list:10,46
/sys/devices/system/cpu/cpu10/cache/index1/shared_cpu_list:10,46
/sys/devices/system/cpu/cpu10/cache/index2/shared_cpu_list:10,46
/sys/devices/system/cpu/cpu10/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu11/cache/index0/shared_cpu_list:11,47
/sys/devices/system/cpu/cpu11/cache/index1/shared_cpu_list:11,47
/sys/devices/system/cpu/cpu11/cache/index2/shared_cpu_list:11,47
/sys/devices/system/cpu/cpu11/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu12/cache/index0/shared_cpu_list:12,48
/sys/devices/system/cpu/cpu12/cache/index1/shared_cpu_list:12,48
/sys/devices/system/cpu/cpu12/cache/index2/shared_cpu_list:12,48
/sys/devices/system/cpu/cpu12/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu13/cache/index0/shared_cpu_list:13,49
/sys/devices/system/cpu/cpu13/cache/index1/shared_cpu_list:13,49
/sys/devices/system/cpu/cpu13/cache/index2/shared_cpu_list:13,49
/sys/devices/system/cpu/cpu13/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu14/cache/index0/shared_cpu_list:14,50
/sys/devices/system/cpu/cpu14/cache/index1/shared_cpu_list:14,50
/sys/devices/system/cpu/cpu14/cache/index2/shared_cpu_list:14,50
/sys/devices/system/cpu/cpu14/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu15/cache/index0/shared_cpu_list:15,51
/sys/devices/system/cpu/cpu15/cache/index1/shared_cpu_list:15,51
/sys/devices/system/cpu/cpu15/cache/index2/shared_cpu_list:15,51
/sys/devices/system/cpu/cpu15/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu16/cache/index0/shared_cpu_list:16,52
/sys/devices/system/cpu/cpu16/cache/index1/shared_cpu_list:16,52
/sys/devices/system/cpu/cpu16/cache/index2/shared_cpu_list:16,52
/sys/devices/system/cpu/cpu16/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu17/cache/index0/shared_cpu_list:17,53
/sys/devices/system/cpu/cpu17/cache/index1/shared_cpu_list:17,53
/sys/devices/system/cpu/cpu17/cache/index2/shared_cpu_list:17,53
/sys/devices/system/cpu/cpu17/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu18/cache/index0/shared_cpu_list:18,54
/sys/devices/system/cpu/cpu18/cache/index1/shared_cpu_list:18,54
/sys/devices/system/cpu/cpu18/cache/index2/shared_cpu_list:18,54
/sys/devices/system/cpu/cpu18/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu19/cache/index0/shared_cpu_list:19,55
/sys/devices/system/cpu/cpu19/cache/index1/shared_cpu_list:19,55
/sys/devices/system/cpu/cpu19/cache/index2/shared_cpu_list:19,55
/sys/devices/system/cpu/cpu19/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu1/cache/index0/shared_cpu_list:1,37
/sys/devices/system/cpu/cpu1/cache/index1/shared_cpu_list:1,37
/sys/devices/system/cpu/cpu1/cache/index2/shared_cpu_list:1,37
/sys/devices/system/cpu/cpu1/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu20/cache/index0/shared_cpu_list:20,56
/sys/devices/system/cpu/cpu20/cache/index1/shared_cpu_list:20,56
/sys/devices/system/cpu/cpu20/cache/index2/shared_cpu_list:20,56
/sys/devices/system/cpu/cpu20/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu21/cache/index0/shared_cpu_list:21,57
/sys/devices/system/cpu/cpu21/cache/index1/shared_cpu_list:21,57
/sys/devices/system/cpu/cpu21/cache/index2/shared_cpu_list:21,57
/sys/devices/system/cpu/cpu21/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu22/cache/index0/shared_cpu_list:22,58
/sys/devices/system/cpu/cpu22/cache/index1/shared_cpu_list:22,58
/sys/devices/system/cpu/cpu22/cache/index2/shared_cpu_list:22,58
/sys/devices/system/cpu/cpu22/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu23/cache/index0/shared_cpu_list:23,59
/sys/devices/system/cpu/cpu23/cache/index1/shared_cpu_list:23,59
/sys/devices/system/cpu/cpu23/cache/index2/shared_cpu_list:23,59
/sys/devices/system/cpu/cpu23/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu24/cache/index0/shared_cpu_list:24,60
/sys/devices/system/cpu/cpu24/cache/index1/shared_cpu_list:24,60
/sys/devices/system/cpu/cpu24/cache/index2/shared_cpu_list:24,60
/sys/devices/system/cpu/cpu24/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu25/cache/index0/shared_cpu_list:25,61
/sys/devices/system/cpu/cpu25/cache/index1/shared_cpu_list:25,61
/sys/devices/system/cpu/cpu25/cache/index2/shared_cpu_list:25,61
/sys/devices/system/cpu/cpu25/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu26/cache/index0/shared_cpu_list:26,62
/sys/devices/system/cpu/cpu26/cache/index1/shared_cpu_list:26,62
/sys/devices/system/cpu/cpu26/cache/index2/shared_cpu_list:26,62
/sys/devices/system/cpu/cpu26/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu27/cache/index0/shared_cpu_list:27,63
/sys/devices/system/cpu/cpu27/cache/index1/shared_cpu_list:27,63
/sys/devices/system/cpu/cpu27/cache/index2/shared_cpu_list:27,63
/sys/devices/system/cpu/cpu27/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu28/cache/index0/shared_cpu_list:28,64
/sys/devices/system/cpu/cpu28/cache/index1/shared_cpu_list:28,64
/sys/devices/system/cpu/cpu28/cache/index2/shared_cpu_list:28,64
/sys/devices/system/cpu/cpu28/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu29/cache/index0/shared_cpu_list:29,65
/sys/devices/system/cpu/cpu29/cache/index1/shared_cpu_list:29,65
/sys/devices/system/cpu/cpu29/cache/index2/shared_cpu_list:29,65
/sys/devices/system/cpu/cpu29/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu2/cache/index0/shared_cpu_list:2,38
/sys/devices/system/cpu/cpu2/cache/index1/shared_cpu_list:2,38
/sys/devices/system/cpu/cpu2/cache/index2/shared_cpu_list:2,38
/sys/devices/system/cpu/cpu2/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu30/cache/index0/shared_cpu_list:30,66
/sys/devices/system/cpu/cpu30/cache/index1/shared_cpu_list:30,66
/sys/devices/system/cpu/cpu30/cache/index2/shared_cpu_list:30,66
/sys/devices/system/cpu/cpu30/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu31/cache/index0/shared_cpu_list:31,67
/sys/devices/system/cpu/cpu31/cache/index1/shared_cpu_list:31,67
/sys/devices/system/cpu/cpu31/cache/index2/shared_cpu_list:31,67
/sys/devices/system/cpu/cpu31/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu32/cache/index0/shared_cpu_list:32,68
/sys/devices/system/cpu/cpu32/cache/index1/shared_cpu_list:32,68
/sys/devices/system/cpu/cpu32/cache/index2/shared_cpu_list:32,68
/sys/devices/system/cpu/cpu32/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu33/cache/index0/shared_cpu_list:33,69
/sys/devices/system/cpu/cpu33/cache/index1/shared_cpu_list:33,69
/sys/devices/system/cpu/cpu33/cache/index2/shared_cpu_list:33,69
/sys/devices/system/cpu/cpu33/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu34/cache/index0/shared_cpu_list:34,70
/sys/devices/system/cpu/cpu34/cache/index1/shared_cpu_list:34,70
/sys/devices/system/cpu/cpu34/cache/index2/shared_cpu_list:34,70
/sys/devices/system/cpu/cpu34/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu35/cache/index0/shared_cpu_list:35,71
/sys/devices/system/cpu/cpu35/cache/index1/shared_cpu_list:35,71
/sys/devices/system/cpu/cpu35/cache/index2/shared_cpu_list:35,71
/sys/devices/system/cpu/cpu35/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu36/cache/index0/shared_cpu_list:0,36
/sys/devices/system/cpu/cpu36/cache/index1/shared_cpu_list:0,36
/sys/devices/system/cpu/cpu36/cache/index2/shared_cpu_list:0,36
/sys/devices/system/cpu/cpu36/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu37/cache/index0/shared_cpu_list:1,37
/sys/devices/system/cpu/cpu37/cache/index1/shared_cpu_list:1,37
/sys/devices/system/cpu/cpu37/cache/index2/shared_cpu_list:1,37
/sys/devices/system/cpu/cpu37/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu38/cache/index0/shared_cpu_list:2,38
/sys/devices/system/cpu/cpu38/cache/index1/shared_cpu_list:2,38
/sys/devices/system/cpu/cpu38/cache/index2/shared_cpu_list:2,38
/sys/devices/system/cpu/cpu38/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu39/cache/index0/shared_cpu_list:3,39
/sys/devices/system/cpu/cpu39/cache/index1/shared_cpu_list:3,39
/sys/devices/system/cpu/cpu39/cache/index2/shared_cpu_list:3,39
/sys/devices/system/cpu/cpu39/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu3/cache/index0/shared_cpu_list:3,39
/sys/devices/system/cpu/cpu3/cache/index1/shared_cpu_list:3,39
/sys/devices/system/cpu/cpu3/cache/index2/shared_cpu_list:3,39
/sys/devices/system/cpu/cpu3/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu40/cache/index0/shared_cpu_list:4,40
/sys/devices/system/cpu/cpu40/cache/index1/shared_cpu_list:4,40
/sys/devices/system/cpu/cpu40/cache/index2/shared_cpu_list:4,40
/sys/devices/system/cpu/cpu40/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu41/cache/index0/shared_cpu_list:5,41
/sys/devices/system/cpu/cpu41/cache/index1/shared_cpu_list:5,41
/sys/devices/system/cpu/cpu41/cache/index2/shared_cpu_list:5,41
/sys/devices/system/cpu/cpu41/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu42/cache/index0/shared_cpu_list:6,42
/sys/devices/system/cpu/cpu42/cache/index1/shared_cpu_list:6,42
/sys/devices/system/cpu/cpu42/cache/index2/shared_cpu_list:6,42
/sys/devices/system/cpu/cpu42/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu43/cache/index0/shared_cpu_list:7,43
/sys/devices/system/cpu/cpu43/cache/index1/shared_cpu_list:7,43
/sys/devices/system/cpu/cpu43/cache/index2/shared_cpu_list:7,43
/sys/devices/system/cpu/cpu43/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu44/cache/index0/shared_cpu_list:8,44
/sys/devices/system/cpu/cpu44/cache/index1/shared_cpu_list:8,44
/sys/devices/system/cpu/cpu44/cache/index2/shared_cpu_list:8,44
/sys/devices/system/cpu/cpu44/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu45/cache/index0/shared_cpu_list:9,45
/sys/devices/system/cpu/cpu45/cache/index1/shared_cpu_list:9,45
/sys/devices/system/cpu/cpu45/cache/index2/shared_cpu_list:9,45
/sys/devices/system/cpu/cpu45/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu46/cache/index0/shared_cpu_list:10,46
/sys/devices/system/cpu/cpu46/cache/index1/shared_cpu_list:10,46
/sys/devices/system/cpu/cpu46/cache/index2/shared_cpu_list:10,46
/sys/devices/system/cpu/cpu46/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu47/cache/index0/shared_cpu_list:11,47
/sys/devices/system/cpu/cpu47/cache/index1/shared_cpu_list:11,47
/sys/devices/system/cpu/cpu47/cache/index2/shared_cpu_list:11,47
/sys/devices/system/cpu/cpu47/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu48/cache/index0/shared_cpu_list:12,48
/sys/devices/system/cpu/cpu48/cache/index1/shared_cpu_list:12,48
/sys/devices/system/cpu/cpu48/cache/index2/shared_cpu_list:12,48
/sys/devices/system/cpu/cpu48/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu49/cache/index0/shared_cpu_list:13,49
/sys/devices/system/cpu/cpu49/cache/index1/shared_cpu_list:13,49
/sys/devices/system/cpu/cpu49/cache/index2/shared_cpu_list:13,49
/sys/devices/system/cpu/cpu49/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu4/cache/index0/shared_cpu_list:4,40
/sys/devices/system/cpu/cpu4/cache/index1/shared_cpu_list:4,40
/sys/devices/system/cpu/cpu4/cache/index2/shared_cpu_list:4,40
/sys/devices/system/cpu/cpu4/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu50/cache/index0/shared_cpu_list:14,50
/sys/devices/system/cpu/cpu50/cache/index1/shared_cpu_list:14,50
/sys/devices/system/cpu/cpu50/cache/index2/shared_cpu_list:14,50
/sys/devices/system/cpu/cpu50/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu51/cache/index0/shared_cpu_list:15,51
/sys/devices/system/cpu/cpu51/cache/index1/shared_cpu_list:15,51
/sys/devices/system/cpu/cpu51/cache/index2/shared_cpu_list:15,51
/sys/devices/system/cpu/cpu51/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu52/cache/index0/shared_cpu_list:16,52
/sys/devices/system/cpu/cpu52/cache/index1/shared_cpu_list:16,52
/sys/devices/system/cpu/cpu52/cache/index2/shared_cpu_list:16,52
/sys/devices/system/cpu/cpu52/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu53/cache/index0/shared_cpu_list:17,53
/sys/devices/system/cpu/cpu53/cache/index1/shared_cpu_list:17,53
/sys/devices/system/cpu/cpu53/cache/index2/shared_cpu_list:17,53
/sys/devices/system/cpu/cpu53/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu54/cache/index0/shared_cpu_list:18,54
/sys/devices/system/cpu/cpu54/cache/index1/shared_cpu_list:18,54
/sys/devices/system/cpu/cpu54/cache/index2/shared_cpu_list:18,54
/sys/devices/system/cpu/cpu54/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu55/cache/index0/shared_cpu_list:19,55
/sys/devices/system/cpu/cpu55/cache/index1/shared_cpu_list:19,55
/sys/devices/system/cpu/cpu55/cache/index2/shared_cpu_list:19,55
/sys/devices/system/cpu/cpu55/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu56/cache/index0/shared_cpu_list:20,56
/sys/devices/system/cpu/cpu56/cache/index1/shared_cpu_list:20,56
/sys/devices/system/cpu/cpu56/cache/index2/shared_cpu_list:20,56
/sys/devices/system/cpu/cpu56/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu57/cache/index0/shared_cpu_list:21,57
/sys/devices/system/cpu/cpu57/cache/index1/shared_cpu_list:21,57
/sys/devices/system/cpu/cpu57/cache/index2/shared_cpu_list:21,57
/sys/devices/system/cpu/cpu57/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu58/cache/index0/shared_cpu_list:22,58
/sys/devices/system/cpu/cpu58/cache/index1/shared_cpu_list:22,58
/sys/devices/system/cpu/cpu58/cache/index2/shared_cpu_list:22,58
/sys/devices/system/cpu/cpu58/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu59/cache/index0/shared_cpu_list:23,59
/sys/devices/system/cpu/cpu59/cache/index1/shared_cpu_list:23,59
/sys/devices/system/cpu/cpu59/cache/index2/shared_cpu_list:23,59
/sys/devices/system/cpu/cpu59/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu5/cache/index0/shared_cpu_list:5,41
/sys/devices/system/cpu/cpu5/cache/index1/shared_cpu_list:5,41
/sys/devices/system/cpu/cpu5/cache/index2/shared_cpu_list:5,41
/sys/devices/system/cpu/cpu5/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu60/cache/index0/shared_cpu_list:24,60
/sys/devices/system/cpu/cpu60/cache/index1/shared_cpu_list:24,60
/sys/devices/system/cpu/cpu60/cache/index2/shared_cpu_list:24,60
/sys/devices/system/cpu/cpu60/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu61/cache/index0/shared_cpu_list:25,61
/sys/devices/system/cpu/cpu61/cache/index1/shared_cpu_list:25,61
/sys/devices/system/cpu/cpu61/cache/index2/shared_cpu_list:25,61
/sys/devices/system/cpu/cpu61/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu62/cache/index0/shared_cpu_list:26,62
/sys/devices/system/cpu/cpu62/cache/index1/shared_cpu_list:26,62
/sys/devices/system/cpu/cpu62/cache/index2/shared_cpu_list:26,62
/sys/devices/system/cpu/cpu62/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu63/cache/index0/shared_cpu_list:27,63
/sys/devices/system/cpu/cpu63/cache/index1/shared_cpu_list:27,63
/sys/devices/system/cpu/cpu63/cache/index2/shared_cpu_list:27,63
/sys/devices/system/cpu/cpu63/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu64/cache/index0/shared_cpu_list:28,64
/sys/devices/system/cpu/cpu64/cache/index1/shared_cpu_list:28,64
/sys/devices/system/cpu/cpu64/cache/index2/shared_cpu_list:28,64
/sys/devices/system/cpu/cpu64/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu65/cache/index0/shared_cpu_list:29,65
/sys/devices/system/cpu/cpu65/cache/index1/shared_cpu_list:29,65
/sys/devices/system/cpu/cpu65/cache/index2/shared_cpu_list:29,65
/sys/devices/system/cpu/cpu65/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu66/cache/index0/shared_cpu_list:30,66
/sys/devices/system/cpu/cpu66/cache/index1/shared_cpu_list:30,66
/sys/devices/system/cpu/cpu66/cache/index2/shared_cpu_list:30,66
/sys/devices/system/cpu/cpu66/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu67/cache/index0/shared_cpu_list:31,67
/sys/devices/system/cpu/cpu67/cache/index1/shared_cpu_list:31,67
/sys/devices/system/cpu/cpu67/cache/index2/shared_cpu_list:31,67
/sys/devices/system/cpu/cpu67/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu68/cache/index0/shared_cpu_list:32,68
/sys/devices/system/cpu/cpu68/cache/index1/shared_cpu_list:32,68
/sys/devices/system/cpu/cpu68/cache/index2/shared_cpu_list:32,68
/sys/devices/system/cpu/cpu68/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu69/cache/index0/shared_cpu_list:33,69
/sys/devices/system/cpu/cpu69/cache/index1/shared_cpu_list:33,69
/sys/devices/system/cpu/cpu69/cache/index2/shared_cpu_list:33,69
/sys/devices/system/cpu/cpu69/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu6/cache/index0/shared_cpu_list:6,42
/sys/devices/system/cpu/cpu6/cache/index1/shared_cpu_list:6,42
/sys/devices/system/cpu/cpu6/cache/index2/shared_cpu_list:6,42
/sys/devices/system/cpu/cpu6/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu70/cache/index0/shared_cpu_list:34,70
/sys/devices/system/cpu/cpu70/cache/index1/shared_cpu_list:34,70
/sys/devices/system/cpu/cpu70/cache/index2/shared_cpu_list:34,70
/sys/devices/system/cpu/cpu70/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu71/cache/index0/shared_cpu_list:35,71
/sys/devices/system/cpu/cpu71/cache/index1/shared_cpu_list:35,71
/sys/devices/system/cpu/cpu71/cache/index2/shared_cpu_list:35,71
/sys/devices/system/cpu/cpu71/cache/index3/shared_cpu_list:18-35,54-71
/sys/devices/system/cpu/cpu7/cache/index0/shared_cpu_list:7,43
/sys/devices/system/cpu/cpu7/cache/index1/shared_cpu_list:7,43
/sys/devices/system/cpu/cpu7/cache/index2/shared_cpu_list:7,43
/sys/devices/system/cpu/cpu7/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu8/cache/index0/shared_cpu_list:8,44
/sys/devices/system/cpu/cpu8/cache/index1/shared_cpu_list:8,44
/sys/devices/system/cpu/cpu8/cache/index2/shared_cpu_list:8,44
/sys/devices/system/cpu/cpu8/cache/index3/shared_cpu_list:0-17,36-53
/sys/devices/system/cpu/cpu9/cache/index0/shared_cpu_list:9,45
/sys/devices/system/cpu/cpu9/cache/index1/shared_cpu_list:9,45
/sys/devices/system/cpu/cpu9/cache/index2/shared_cpu_list:9,45
/sys/devices/system/cpu/cpu9/cache/index3/shared_cpu_list:0-17,36-53
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] cacheinfo: Introduce cache id
  2016-07-01 19:08               ` Yu, Fenghua
@ 2016-07-04 17:29                 ` Borislav Petkov
  0 siblings, 0 replies; 15+ messages in thread
From: Borislav Petkov @ 2016-07-04 17:29 UTC (permalink / raw)
  To: Yu, Fenghua
  Cc: Luck, Tony, Thomas Gleixner, Ingo Molnar, Anvin, H Peter,
	Peter Zijlstra, Stephane Eranian, Shankar, Ravi V,
	Vikas Shivappa, linux-kernel, x86

On Fri, Jul 01, 2016 at 07:08:56PM +0000, Yu, Fenghua wrote:
> For L3 schema on a two socket system which has two L3 caches, user input:
> L3:0=3;1=f

Ok, so you basically want to read out the cache id from sysfs so that
userspace can configure CAT properly. Thanks for the detailed writeup.

Btw, some of that text should be added to

Documentation/ABI/testing/sysfs-devices-system-cpu

explaining the new 'id' node.

Thanks.

-- 
Regards/Gruss,
    Boris.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] cacheinfo: Introduce cache id
  2016-07-01 19:24           ` Yu, Fenghua
@ 2016-07-04 17:58             ` Borislav Petkov
  0 siblings, 0 replies; 15+ messages in thread
From: Borislav Petkov @ 2016-07-04 17:58 UTC (permalink / raw)
  To: Yu, Fenghua
  Cc: Luck, Tony, Thomas Gleixner, Ingo Molnar, Anvin, H Peter,
	Peter Zijlstra, Stephane Eranian, Shankar, Ravi V,
	Vikas Shivappa, linux-kernel, x86

On Fri, Jul 01, 2016 at 07:24:27PM +0000, Yu, Fenghua wrote:
> I haven't tested on AMD. But I think AMD should have the same code.

Again, bear in mind, this is a qemu+kvm guest.

> Could you please check if
> /sys/device/system/cpu/cpu#/cache/index#/shared_cpu_map contains only
> the cpu itself?

Yes it does:

$ grep . -EriIn /sys/devices/system/cpu/cpu*/cache/index*/shared_cpu_map
/sys/devices/system/cpu/cpu0/cache/index0/shared_cpu_map:1:01
/sys/devices/system/cpu/cpu0/cache/index1/shared_cpu_map:1:01
/sys/devices/system/cpu/cpu0/cache/index2/shared_cpu_map:1:01
/sys/devices/system/cpu/cpu1/cache/index0/shared_cpu_map:1:02
/sys/devices/system/cpu/cpu1/cache/index1/shared_cpu_map:1:02
/sys/devices/system/cpu/cpu1/cache/index2/shared_cpu_map:1:02
/sys/devices/system/cpu/cpu2/cache/index0/shared_cpu_map:1:04
/sys/devices/system/cpu/cpu2/cache/index1/shared_cpu_map:1:04
/sys/devices/system/cpu/cpu2/cache/index2/shared_cpu_map:1:04
/sys/devices/system/cpu/cpu3/cache/index0/shared_cpu_map:1:08
/sys/devices/system/cpu/cpu3/cache/index1/shared_cpu_map:1:08
/sys/devices/system/cpu/cpu3/cache/index2/shared_cpu_map:1:08
/sys/devices/system/cpu/cpu4/cache/index0/shared_cpu_map:1:10
/sys/devices/system/cpu/cpu4/cache/index1/shared_cpu_map:1:10
/sys/devices/system/cpu/cpu4/cache/index2/shared_cpu_map:1:10
/sys/devices/system/cpu/cpu5/cache/index0/shared_cpu_map:1:20
/sys/devices/system/cpu/cpu5/cache/index1/shared_cpu_map:1:20
/sys/devices/system/cpu/cpu5/cache/index2/shared_cpu_map:1:20
/sys/devices/system/cpu/cpu6/cache/index0/shared_cpu_map:1:40
/sys/devices/system/cpu/cpu6/cache/index1/shared_cpu_map:1:40
/sys/devices/system/cpu/cpu6/cache/index2/shared_cpu_map:1:40
/sys/devices/system/cpu/cpu7/cache/index0/shared_cpu_map:1:80
/sys/devices/system/cpu/cpu7/cache/index1/shared_cpu_map:1:80
/sys/devices/system/cpu/cpu7/cache/index2/shared_cpu_map:1:80

Here's the same from a real AMD system:

 grep . -EriIn /sys/devices/system/cpu/cpu*/cache/index*/shared_cpu_map
/sys/devices/system/cpu/cpu0/cache/index0/shared_cpu_map:1:01
/sys/devices/system/cpu/cpu0/cache/index1/shared_cpu_map:1:01
/sys/devices/system/cpu/cpu0/cache/index2/shared_cpu_map:1:01
/sys/devices/system/cpu/cpu0/cache/index3/shared_cpu_map:1:3f
/sys/devices/system/cpu/cpu1/cache/index0/shared_cpu_map:1:02
/sys/devices/system/cpu/cpu1/cache/index1/shared_cpu_map:1:02
/sys/devices/system/cpu/cpu1/cache/index2/shared_cpu_map:1:02
/sys/devices/system/cpu/cpu1/cache/index3/shared_cpu_map:1:3f
/sys/devices/system/cpu/cpu2/cache/index0/shared_cpu_map:1:04
/sys/devices/system/cpu/cpu2/cache/index1/shared_cpu_map:1:04
/sys/devices/system/cpu/cpu2/cache/index2/shared_cpu_map:1:04
/sys/devices/system/cpu/cpu2/cache/index3/shared_cpu_map:1:3f
/sys/devices/system/cpu/cpu3/cache/index0/shared_cpu_map:1:08
/sys/devices/system/cpu/cpu3/cache/index1/shared_cpu_map:1:08
/sys/devices/system/cpu/cpu3/cache/index2/shared_cpu_map:1:08
/sys/devices/system/cpu/cpu3/cache/index3/shared_cpu_map:1:3f
/sys/devices/system/cpu/cpu4/cache/index0/shared_cpu_map:1:10
/sys/devices/system/cpu/cpu4/cache/index1/shared_cpu_map:1:10
/sys/devices/system/cpu/cpu4/cache/index2/shared_cpu_map:1:10
/sys/devices/system/cpu/cpu4/cache/index3/shared_cpu_map:1:3f
/sys/devices/system/cpu/cpu5/cache/index0/shared_cpu_map:1:20
/sys/devices/system/cpu/cpu5/cache/index1/shared_cpu_map:1:20
/sys/devices/system/cpu/cpu5/cache/index2/shared_cpu_map:1:20
/sys/devices/system/cpu/cpu5/cache/index3/shared_cpu_map:1:3f

L3 is correctly shared between all cores.

> From the cache id you dump on KVM, it tells there are 8 cache leaf 0,
> 8 cache leaf 1, and 8 cache leaf 2. That means each CPU has its own
> 3 caches (I can't tell from the cache id which level they are. The
> cache/index#/level will tell that).
>
> If this is not the case, maybe cache id doesn't work on AMD. Maybe I
> don't enable cache id for AMD?

Nah, leave it as it is. Who knows what we might use it for on AMD.

> From the info, cache id on one level is unique on that level across the board.

Same on the AMD box:

$ grep . -EriIn /sys/devices/system/cpu/cpu*/cache/index*/id
/sys/devices/system/cpu/cpu0/cache/index0/id:1:0
/sys/devices/system/cpu/cpu0/cache/index1/id:1:0
/sys/devices/system/cpu/cpu0/cache/index2/id:1:0
/sys/devices/system/cpu/cpu0/cache/index3/id:1:0
/sys/devices/system/cpu/cpu1/cache/index0/id:1:1
/sys/devices/system/cpu/cpu1/cache/index1/id:1:1
/sys/devices/system/cpu/cpu1/cache/index2/id:1:1
/sys/devices/system/cpu/cpu1/cache/index3/id:1:1
/sys/devices/system/cpu/cpu2/cache/index0/id:1:2
/sys/devices/system/cpu/cpu2/cache/index1/id:1:2
/sys/devices/system/cpu/cpu2/cache/index2/id:1:2
/sys/devices/system/cpu/cpu2/cache/index3/id:1:2
/sys/devices/system/cpu/cpu3/cache/index0/id:1:3
/sys/devices/system/cpu/cpu3/cache/index1/id:1:3
/sys/devices/system/cpu/cpu3/cache/index2/id:1:3
/sys/devices/system/cpu/cpu3/cache/index3/id:1:3
/sys/devices/system/cpu/cpu4/cache/index0/id:1:4
/sys/devices/system/cpu/cpu4/cache/index1/id:1:4
/sys/devices/system/cpu/cpu4/cache/index2/id:1:4
/sys/devices/system/cpu/cpu4/cache/index3/id:1:4
/sys/devices/system/cpu/cpu5/cache/index0/id:1:5
/sys/devices/system/cpu/cpu5/cache/index1/id:1:5
/sys/devices/system/cpu/cpu5/cache/index2/id:1:5
/sys/devices/system/cpu/cpu5/cache/index3/id:1:5

> /sys/devices/system/cpu/cpu0/cache/index0/id:0
> /sys/devices/system/cpu/cpu0/cache/index1/id:0
> /sys/devices/system/cpu/cpu0/cache/index2/id:0
> /sys/devices/system/cpu/cpu0/cache/index3/id:0
> /sys/devices/system/cpu/cpu10/cache/index0/id:17
> /sys/devices/system/cpu/cpu10/cache/index1/id:17
> /sys/devices/system/cpu/cpu10/cache/index2/id:17

Hmm, so non-L3 caches, i.e., the unshared ones, have different IDs from
the CPU numbers. That's probably because we use the APIC IDs to generate
the cache IDs. Not that it matters too much...

...

> /sys/devices/system/cpu/cpu0/cache/index0/shared_cpu_list:0,36
> /sys/devices/system/cpu/cpu0/cache/index1/shared_cpu_list:0,36
> /sys/devices/system/cpu/cpu0/cache/index2/shared_cpu_list:0,36
> /sys/devices/system/cpu/cpu0/cache/index3/shared_cpu_list:0-17,36-53

Right, and this shows what is shared by what.

-- 
Regards/Gruss,
    Boris.

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-07-04 17:58 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-30  1:56 [PATCH] cacheinfo: Introduce cache id Fenghua Yu
2016-06-30  1:56 ` Fenghua Yu
2016-07-01 10:21 ` Borislav Petkov
2016-07-01 16:50   ` Luck, Tony
2016-07-01 17:27     ` Borislav Petkov
2016-07-01 18:00       ` Luck, Tony
2016-07-01 18:29         ` Borislav Petkov
2016-07-01 18:32           ` Yu, Fenghua
2016-07-01 18:40             ` Borislav Petkov
2016-07-01 19:08               ` Yu, Fenghua
2016-07-04 17:29                 ` Borislav Petkov
2016-07-01 18:01       ` Yu, Fenghua
2016-07-01 18:35         ` Borislav Petkov
2016-07-01 19:24           ` Yu, Fenghua
2016-07-04 17:58             ` Borislav Petkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.