Messages in this thread | | | From | Tim Chen <> | Subject | Re: [Patch v5 08/16] smt: Create cpu_smt_enabled static key for SMT specific code | Date | Mon, 19 Nov 2018 11:25:08 -0800 |
| |
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
| |