[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1103301113510.27742@router.home>
Date: Wed, 30 Mar 2011 11:15:38 -0500 (CDT)
From: Christoph Lameter <cl@...ux.com>
To: Tejun Heo <tj@...nel.org>
cc: "H. Peter Anvin" <hpa@...or.com>, Andi Kleen <andi@...stfloor.org>,
Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Pekka Enberg <penberg@...nel.org>
Subject: Re: [PATCH tip:x86/mm 1/3] x86: A fast way to check capabilities of
the current cpu
On Wed, 30 Mar 2011, Tejun Heo wrote:
> 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.
The main simplification is that the pointer to the cpu_info can be
omitted. Its passed around quite a bit right now in x86 arch code.
Removal of the cpu_info pointer could reduce code size and allow faster
access.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists