lkml.org 
[lkml]   [2004]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
Date
From
SubjectRe: [PATCH] atomic_inc_return() for i386[1/5] (Re: atomic_inc_return)
On Sat, Sep 11, 2004 at 04:05:32PM -0700, Andrew Morton wrote:
> kaigai@ak.jp.nec.com (Kaigai Kohei) wrote:
> >
> >
> > [1/5] atomic_inc_return-linux-2.6.9-rc1.i386.patch
> > This patch implements atomic_inc_return() and so on for i386,
> > and includes runtime check whether CPU is legacy 386.
> > It is same as I posted to LKML and Andi Kleen at '04/09/01.
> >
>
> Can we not use the `alternative instruction' stuff to eliminate the runtime
> test?

Yes, we could. I suggested this to Kaigai-san earlier, but
he decided that it was too complicated because he would have needed
to add an additional alternative() macro with enough parameters.

Given that atomic instructions are quite costly anyways and the jump
should be very predictable he's probably right that it wouldn't
be worth the effort.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:06    [from the cache]
©2003-2011 Jasper Spaans