Skip to content

Commit 1a17160

Browse files
aeglbp3tk0v
authored andcommitted
x86/resctrl: Add node-scope to the options for feature scope
Currently supported resctrl features are all domain scoped the same as the scope of the L2 or L3 caches. Add RESCTRL_L3_NODE as a new option for features that are scoped at the same granularity as NUMA nodes. This is needed for Intel's Sub-NUMA Cluster (SNC) feature where monitoring features are divided between nodes that share an L3 cache. Signed-off-by: Tony Luck <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Tested-by: Babu Moger <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent cae2bcb commit 1a17160

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

arch/x86/kernel/cpu/resctrl/core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,8 @@ static int get_domain_id_from_scope(int cpu, enum resctrl_scope scope)
510510
case RESCTRL_L2_CACHE:
511511
case RESCTRL_L3_CACHE:
512512
return get_cpu_cacheinfo_id(cpu, scope);
513+
case RESCTRL_L3_NODE:
514+
return cpu_to_node(cpu);
513515
default:
514516
break;
515517
}

include/linux/resctrl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ struct resctrl_schema;
176176
enum resctrl_scope {
177177
RESCTRL_L2_CACHE = 2,
178178
RESCTRL_L3_CACHE = 3,
179+
RESCTRL_L3_NODE,
179180
};
180181

181182
/**

0 commit comments

Comments
 (0)