Messages in this thread | | | Date | Wed, 30 Mar 2011 18:07:56 +0200 | From | Tejun Heo <> | Subject | Re: [PATCH tip:x86/mm 1/3] x86: A fast way to check capabilities of the current cpu |
| |
Hello,
On Wed, Mar 30, 2011 at 08:58:23AM -0700, H. Peter Anvin wrote: > >> 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 > static_branch()).
These patches have performance benefits but I don't think it would be noticeable. I think it's more of code cleanup.
Thanks.
-- tejun
| |