[lkml]   [2011]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH tip:x86/mm 1/3] x86: A fast way to check capabilities of the current cpu
On 03/14/2011 12:49 PM, Andi Kleen wrote:
> Tejun Heo <> writes:
>> Add this_cpu_has() which determines if the current cpu has a certain
>> ability using a segment prefix and a bit test operation.
> Hmm: if the CPU capability is really tested in a performance critical
> path, wouldn't it even be better to just use static_branch() now?

We have static_cpu_has() for this specific purpose (it actually predates


H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.

 \ /
  Last update: 2011-03-30 18:03    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean