lkml.org 
[lkml]   [2023]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v5 4/8] x86/resctrl: Add node-scope to the options for feature scope
    Date
    Currently supported resctrl features are all domain scoped the same as the
    scope of the L2 or L3 caches.

    Add "node" as a new option for domain scope.

    Signed-off-by: Tony Luck <tony.luck@intel.com>
    ---
    include/linux/resctrl.h | 1 +
    arch/x86/kernel/cpu/resctrl/core.c | 2 ++
    2 files changed, 3 insertions(+)

    diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h
    index 08382548571e..f55cf7afd4eb 100644
    --- a/include/linux/resctrl.h
    +++ b/include/linux/resctrl.h
    @@ -163,6 +163,7 @@ struct resctrl_schema;
    enum resctrl_scope {
    RESCTRL_L3_CACHE,
    RESCTRL_L2_CACHE,
    + RESCTRL_NODE,
    };

    /**
    diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c
    index 3e08aa04a7ff..9fcc264fac6c 100644
    --- a/arch/x86/kernel/cpu/resctrl/core.c
    +++ b/arch/x86/kernel/cpu/resctrl/core.c
    @@ -514,6 +514,8 @@ static int get_domain_id_from_scope(int cpu, enum resctrl_scope scope)
    return get_cpu_cacheinfo_id(cpu, 3);
    case RESCTRL_L2_CACHE:
    return get_cpu_cacheinfo_id(cpu, 2);
    + case RESCTRL_NODE:
    + return cpu_to_node(cpu);
    default:
    WARN_ON_ONCE(1);
    break;
    --
    2.41.0
    \
     
     \ /
      Last update: 2023-08-30 01:47    [W:4.475 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site