Re: [Futex RFC] was Re: [BUG FIX] Make x86_32 uni-processor Atomic ops, Atomic

From: Michael S. Zick
Date: Thu May 28 2009 - 22:00:23 EST


On Thu May 28 2009, Michael S. Zick wrote:
>
> Please, somebody apply an experienced eye-ball to this;
> It does seem to make a difference, but tests have not run
> for very long yet.
>
> diff --git a/arch/x86/include/asm/futex.h b/arch/x86/include/asm/futex.h
> index 1f11ce4..da3c801 100644
> --- a/arch/x86/include/asm/futex.h
> +++ b/arch/x86/include/asm/futex.h
> @@ -19,7 +19,8 @@
> "\t.previous\n" \
> _ASM_EXTABLE(1b, 3b) \
> : "=r" (oldval), "=r" (ret), "+m" (*uaddr) \
> - : "i" (-EFAULT), "0" (oparg), "1" (0))
> + : "i" (-EFAULT), "0" (oparg), "1" (0) \
> + : "memory")
>
> #define __futex_atomic_op2(insn, ret, oldval, uaddr, oparg) \
> asm volatile("1:\tmovl %2, %0\n" \
> @@ -35,7 +36,8 @@
> _ASM_EXTABLE(2b, 4b) \
> : "=&a" (oldval), "=&r" (ret), \
> "+m" (*uaddr), "=&r" (tem) \
> - : "r" (oparg), "i" (-EFAULT), "1" (0))
> + : "r" (oparg), "i" (-EFAULT), "1" (0) \
> + : "memory")
>
>
> Mike

Without the above annotations: C7-M/CX700 uptime while running
pulse-audio: 1 1/2 hrs.

With the above annotations: C7-M/CX700 uptime, same test setup,
maximum unknown, test terminated after 3 hours.

On the C7-M/CN896 - maximum unknown, test terminated after 12 hrs.

Sample build to be available tomorrow.

Mike
--
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/