Re: [patch] fix i386 mutex fastpath on FRAME_POINTER && !DEBUG_MUTEXES

From: Chuck Ebbert
Date: Wed Jan 11 2006 - 03:26:25 EST


In-Reply-To: <20060110210744.GA8850@xxxxxxx>

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?

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