[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1108240854080.24118@router.home>
Date: Wed, 24 Aug 2011 08:54:40 -0500 (CDT)
From: Christoph Lameter <cl@...ux.com>
To: "H. Peter Anvin" <hpa@...or.com>
cc: Jeremy Fitzhardinge <jeremy@...p.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...e.hu>,
the arch/x86 maintainers <x86@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Nick Piggin <npiggin@...nel.dk>,
Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
Subject: Re: [PATCH 13/15] x86: add cmpxchg_flag() variant
On Tue, 23 Aug 2011, H. Peter Anvin wrote:
> On 08/23/2011 03:15 PM, Jeremy Fitzhardinge wrote:
> >
> > However, having prototyped it, I dunno, it doesn't really seem like much
> > of a win for all the extra code it adds. I just can't get too excited
> > about an extra test instruction adjacent to a monster like a locked
> > cmpxchg. The jump variant avoids the test, but gcc still generates some
> > pretty bogus stuff:
> >
>
> A compare is hardly a big cost, as you're quite correctly pointing out.
Could become relatively costly if the cmpxchg is not locked or the compare
involves comparing multiple words.
--
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