Skip to contentSkip to conversation

cacheinfo: Introduce cache id

PATCH In review Fenghua Yu 3 participants 15 messages Jun 29, 2016 – Jul 4, 2016

Subsystems (2)
lore
Share & tools
lore

Fenghua Yu

author
#0 lore raw

PATCH 1/1 cacheinfo: Introduce cache id

From: Fenghua Yu <[email protected]>

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*/

---
 arch/x86/kernel/cpu/intel_cacheinfo.c | 21 +++++++++++++++++++++
 drivers/base/cacheinfo.c              |  5 +++++
 include/linux/cacheinfo.h             |  3 +++
 3 files changed, 29 insertions(+)
arch/x86/kernel/cpu/intel_cacheinfo.c +21 -0
index de6626c..aefc1e5 100644
@@ -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);
 	}
drivers/base/cacheinfo.c +5 -0
index e9fd32e..2a21c15 100644
@@ -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)
include/linux/cacheinfo.h +3 -0
index 2189935..16e5573 100644
@@ -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;
Signature · 1 line
2.5.0
author
#1 lore raw

PATCH 1/1 cacheinfo: Introduce cache id

From: Fenghua Yu <[email protected]>

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*/

---
 arch/x86/kernel/cpu/intel_cacheinfo.c | 21 +++++++++++++++++++++
 drivers/base/cacheinfo.c              |  5 +++++
 include/linux/cacheinfo.h             |  3 +++
 3 files changed, 29 insertions(+)
arch/x86/kernel/cpu/intel_cacheinfo.c +21 -0
index de6626c..aefc1e5 100644
@@ -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);
 	}
drivers/base/cacheinfo.c +5 -0
index e9fd32e..2a21c15 100644
@@ -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)
include/linux/cacheinfo.h +3 -0
index 2189935..16e5573 100644
@@ -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;
Signature · 1 line
2.5.0
#2 lore raw
In reply to Fenghua Yu
Quoted 3 lines · Fenghua Yu

From: Fenghua Yu <[email protected]>

Each cache node is described by cacheinfo and is a unique node across

What is a cache node?

Quoted 33 lines

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*/

---
 arch/x86/kernel/cpu/intel_cacheinfo.c | 21 +++++++++++++++++++++
 drivers/base/cacheinfo.c              |  5 +++++
 include/linux/cacheinfo.h             |  3 +++
 3 files changed, 29 insertions(+)
arch/x86/kernel/cpu/intel_cacheinfo.c +1 -0
index de6626c..aefc1e5 100644
@@ -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;
 };

arch/x86/kernel/cpu/intel_cacheinfo.c static void __cache_cpumap_setup(unsigned int cpu, int index, · line 899

Quoted 5 lines
arch/x86/kernel/cpu/intel_cacheinfo.c +2 -0
@@ -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.

Quoted 77 lines
arch/x86/kernel/cpu/intel_cacheinfo.c +18 -0
+	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);
 	}
drivers/base/cacheinfo.c +5 -0
index e9fd32e..2a21c15 100644
@@ -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)
include/linux/cacheinfo.h +0 -0
index 2189935..16e5573 100644

include/linux/cacheinfo.h enum cache_type { · line 21

Quoted 4 lines
include/linux/cacheinfo.h +1 -0
@@ -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.

Signature · 5 lines
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 
#3 lore raw
Quoted 6 lines · Borislav Petkov
Quoted 3 lines · Fenghua Yu

From: Fenghua Yu <[email protected]>

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.

Quoted 2 lines

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

#4 lore raw
Quoted 8 lines · Tony

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.

Signature · 5 lines
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 
#5 lore raw
Quoted 6 lines

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

#11 lore raw
In reply to Borislav Petkov
Quoted 27 lines

From: Borislav Petkov [mailto:[email protected]]
Sent: Friday, July 01, 2016 10:28 AM
To: Luck, Tony <[email protected]>
Cc: Yu, Fenghua <[email protected]>; Thomas Gleixner <[email protected]>; Ingo Molnar <[email protected]>; Anvin, H Peter <[email protected]>; Peter Zijlstra <[email protected]>; Stephane Eranian <[email protected]>; Shankar, Ravi V <[email protected]>; Vikas Shivappa <[email protected]>; linux-kernel <linux- [email protected]>; x86 <[email protected]>
Subject: Re: [PATCH] cacheinfo: Introduce cache id

Quoted 1 line · Tony

Here's the situation. We have lots of (mostly) independent caches on a

system.

Quoted 3 lines

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.

Quoted 4 lines

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.

Quoted 6 lines

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.

Quoted 11 lines

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.

Quoted 29 lines

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

Quoted 2 lines

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.

Quoted 3 lines

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:

Quoted 1 line

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

#7 lore raw
In reply to Borislav Petkov
Quoted 18 lines

From: Borislav Petkov [mailto:[email protected]]
Sent: Friday, July 01, 2016 11:29 AM
To: Luck, Tony <[email protected]>
Cc: Yu, Fenghua <[email protected]>; Thomas Gleixner <[email protected]>; Ingo Molnar <[email protected]>; Anvin, H Peter <[email protected]>; Peter Zijlstra <[email protected]>; Stephane Eranian <[email protected]>; Shankar, Ravi V <[email protected]>; Vikas Shivappa <[email protected]>; linux-kernel <linux- [email protected]>; x86 <[email protected]>
Subject: Re: [PATCH] cacheinfo: Introduce cache id

Quoted 5 lines · Tony

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)

Quoted 7 lines
Quoted 2 lines

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

Quoted 26 lines

?

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)
--

#12 lore raw
In reply to Yu, Fenghua
Quoted 1 line · Fenghua

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...

Quoted 1 line

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 :-)

Quoted 3 lines

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.

Signature · 5 lines
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 
#8 lore raw
In reply to Yu, Fenghua
Quoted 1 line · Fenghua

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.

Signature · 5 lines
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 
#6 lore raw
In reply to Luck, Tony
Quoted 6 lines · Tony

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.

Signature · 5 lines
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 
#9 lore raw
In reply to Borislav Petkov
Quoted 6 lines

From: Borislav Petkov [mailto:[email protected]]
Sent: Friday, July 01, 2016 11:40 AM

Quoted 1 line · Fenghua

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

#13 lore raw
In reply to Borislav Petkov
Quoted 14 lines

From: Borislav Petkov [mailto:[email protected]]
Sent: Friday, July 01, 2016 11:36 AM
To: Yu, Fenghua <[email protected]>
Cc: Luck, Tony <[email protected]>; Thomas Gleixner <[email protected]>; Ingo Molnar <[email protected]>; Anvin, H Peter <[email protected]>; Peter Zijlstra <[email protected]>; Stephane Eranian <[email protected]>; Shankar, Ravi V <[email protected]>; Vikas Shivappa <[email protected]>; linux-kernel <linux- [email protected]>; x86 <[email protected]>
Subject: Re: [PATCH] cacheinfo: Introduce cache id

On Fri, Jul 01, 2016 at 06:01:06PM +0000, Yu, Fenghua wrote:

Quoted 8 lines
Quoted 1 line

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...

Quoted 1 line

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?

Quoted 11 lines
Quoted 4 lines

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:)

Quoted 1 line

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

Quoted 1 line
#10 lore raw
In reply to Yu, Fenghua
Quoted 2 lines · Fenghua

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.

Signature · 5 lines
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 
#14 lore raw
In reply to Yu, Fenghua
Quoted 1 line · Fenghua

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.

Quoted 3 lines

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.

Quoted 7 lines

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.

Quoted 1 line

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
Quoted 7 lines

/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...

...

Quoted 4 lines

/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.

Signature · 5 lines
Regards/Gruss,
    Boris.

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