lkml.org 
[lkml]   [2022]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH 14/18] x86/resctrl: Add helpers for system wide mon/alloc capable
    From
    Hello!

    On 10/11/2022 10:51, Shaopeng Tan (Fujitsu) wrote:
    >> resctrl reads rdt_alloc_capable or rdt_mon_capable to determine whether any
    >> of the resources support the corresponding features.
    >> resctrl also uses the static-keys that affect the architecture's context-switch
    >> code to determine the same thing.
    >>
    >> This forces another architecture to have the same static-keys.
    >>
    >> As the static-key is enabled based on the capable flag, and none of the
    >> filesystem uses of these are in the scheduler path, move the capable flags
    >> behind helpers, and use these in the filesystem code instead of the static-key.
    >>
    >> After this change, only the architecture code manages and uses the static-keys
    >> to ensure __resctrl_sched_in() does not need runtime checks.
    >>
    >> This avoids multiple architectures having to define the same static-keys.

    > arch/x86/kernel/cpu/resctrl/rdtgroup.c
    > static void mkdir_rdt_prepare_rmid_free(struct rdtgroup *rgrp)
    > {
    > if (rdt_mon_capable)
    > free_rmid(rgrp->closid, rgrp->mon.rmid);
    > }
    > I think you forgot to fix rdt_mon_capable here.
    > if (rdt_mon_capable) => if (resctrl_arch_mon_capable())

    Yes - looks like I did.


    Thanks!

    James

    \
     
     \ /
      Last update: 2022-11-24 15:22    [W:3.243 / U:0.588 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site