lkml.org 
[lkml]   [2018]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch 10/24] sched/smt: Expose sched_smt_present static key
    On Wed, 21 Nov 2018, Thomas Gleixner wrote:

    > Make the scheduler's 'sched_smt_present' static key globaly available, so
    > it can be used in the x86 speculation control code.
    >
    > Provide a query function and a stub for the CONFIG_SMP=n case.
    >
    > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    > ---
    > include/linux/sched/topology.h | 9 +++++++++
    > kernel/sched/sched.h | 3 ---
    > 2 files changed, 9 insertions(+), 3 deletions(-)
    >
    > --- a/include/linux/sched/topology.h
    > +++ b/include/linux/sched/topology.h
    > @@ -34,10 +34,19 @@
    > #define SD_NUMA 0x4000 /* cross-node balancing */
    >
    > #ifdef CONFIG_SCHED_SMT
    > +extern struct static_key_false sched_smt_present;
    > +
    > +static __always_inline bool sched_smt_active(void)
    > +{
    > + return static_branch_likely(&sched_smt_present);

    0day just told me that this breaks ia64.

    /me goes to fix


    \
     
     \ /
      Last update: 2018-11-21 21:41    [W:2.086 / U:0.184 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site