Re: [UPDATED PATCH 01/10] x86: Add topology_max_smt_threads()

From: Thomas Gleixner
Date: Sat May 07 2016 - 04:13:48 EST


On Fri, 6 May 2016, Andi Kleen wrote:

> For SMT specific workarounds it is useful to know if SMT is active
> on any online CPU in the system. This currently requires a loop
> over all online CPUs.
>
> Add a global variable that is updated with the maximum number
> of smt threads on any CPU on online/offline, and use it for
> topology_max_smt_threads()
>
> The single call is easier to use than a loop.
>
> Not exported to user space because user space already can use
> the existing sibling interfaces to find this out.

Reviewed-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>