lkml.org 
[lkml]   [2006]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] fix i386 mutex fastpath on FRAME_POINTER && !DEBUG_MUTEXES

On Wed, 11 Jan 2006, Chuck Ebbert wrote:

> In-Reply-To: <20060110210744.GA8850@elte.hu>
>
> On Tue, 10 Jan 2006 at 22:07:44 +0100, Ingo Molnar wrote:
>
> > --- linux.orig/include/asm-i386/mutex.h
> > +++ linux/include/asm-i386/mutex.h
> > @@ -28,7 +28,13 @@ do { \
> > \
> > __asm__ __volatile__( \
> > LOCK " decl (%%eax) \n" \
> > - " js "#fail_fn" \n" \
> > + " js 2f \n" \
> > + "1: \n" \
> > + \
> > + LOCK_SECTION_START("") \
> > + "2: call "#fail_fn" \n" \
> > + " jmp 1b \n" \
> > + LOCK_SECTION_END \
> > \
> > :"=a" (dummy) \
> > : "a" (count) \
>
>
> But now it's inefficient again.
>
> Why not this:
>
> LOCK " decl (%%eax) \n" \
> " jns 1f \n" \
> " call "#fail_fn" \n" \
> "1: \n" \
> \
> :"=a" (dummy) \
> : "a" (count) \
>
>
> Will the extra taken forward conditional jump in the fastpath cause much
> of a slowdown?

yeah - the fastpath is much more common than the slowpath.

Ingo
-
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: 2006-01-11 11:16    [W:0.046 / U:1.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site