[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6ed8faad-9c9b-78ac-d77f-50802b695bf0@linux.intel.com>
Date: Mon, 19 Nov 2018 11:25:08 -0800
From: Tim Chen <tim.c.chen@...ux.intel.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Peter Zijlstra <peterz@...radead.org>,
Jiri Kosina <jikos@...nel.org>,
Tom Lendacky <thomas.lendacky@....com>,
Ingo Molnar <mingo@...hat.com>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Andrea Arcangeli <aarcange@...hat.com>,
David Woodhouse <dwmw@...zon.co.uk>,
Andi Kleen <ak@...ux.intel.com>,
Dave Hansen <dave.hansen@...el.com>,
Casey Schaufler <casey.schaufler@...el.com>,
Asit Mallick <asit.k.mallick@...el.com>,
Arjan van de Ven <arjan@...ux.intel.com>,
Jon Masters <jcm@...hat.com>,
Waiman Long <longman9394@...il.com>,
linux-kernel@...r.kernel.org, x86@...nel.org
Subject: Re: [Patch v5 08/16] smt: Create cpu_smt_enabled static key for SMT
specific code
Thomas,
>>
>> +#ifdef CONFIG_SCHED_SMT
>> +
>> +extern struct static_key_false sched_smt_present;
>> +
>> +static inline bool cpu_smt_present(void)
>> +{
>> + if (static_branch_unlikely(&sched_smt_present))
>> + return true;
>> + else
>> + return false;
>
> What's wrong with
>
> return static_branch_unlikely(&sched_smt_present);
>
> ???
>
> But that's just a stylistic nitpick. The real issue is that you prevent the
> mitigation when CONFIG_SCHED_SMT=n.
>
Right. The sched_smt_present is just a scheduler construct and the sibling
cpu will still be brought online. Scratch this.
Tim
Powered by blists - more mailing lists