[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1287428051.1998.2124.camel@laptop>
Date: Mon, 18 Oct 2010 20:54:11 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: gerald.schaefer@...ibm.com
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...e.hu>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
LKML <linux-kernel@...r.kernel.org>,
linux-s390 <linux-s390@...r.kernel.org>,
Heiko Carstens <heiko.carstens@...ibm.com>
Subject: Re: [PATCH] mutex: Introduce arch_mutex_cpu_relax()
On Fri, 2010-10-15 at 13:07 +0200, Gerald Schaefer wrote:
> From: Gerald Schaefer <gerald.schaefer@...ibm.com>
>
> The spinning mutex implementation uses cpu_relax() in busy loops as a
> compiler barrier. Depending on the architecture, cpu_relax() may do more
> than needed in this specific mutex spin loops. On System z we also give
> up the time slice of the virtual cpu in cpu_relax(), which prevents
> effective spinning on the mutex.
>
> This patch replaces cpu_relax() in the spinning mutex code with
> arch_mutex_cpu_relax(), which can be defined by each architecture in
> include/asm/mutex.h. The default is still cpu_relax(), so this should
> not affect other architectures than System z for now.
Ingo's randconfig build found the following, .config attached.
including "asm/mutex.h" isn't advised.
CC kernel/mutex.o
In file included from /usr/src/linux-2.6/kernel/mutex.c:33:
/usr/src/linux-2.6/include/asm-generic/mutex-null.h:13:1: warning: "__mutex_fastpath_lock" redefined
In file included from /usr/src/linux-2.6/arch/x86/include/asm/mutex.h:4,
from /usr/src/linux-2.6/include/linux/mutex.h:19,
from /usr/src/linux-2.6/kernel/mutex.c:20:
/usr/src/linux-2.6/arch/x86/include/asm/mutex_64.h:19:1: warning: this is the location of the previous definition
In file included from /usr/src/linux-2.6/kernel/mutex.c:33:
/usr/src/linux-2.6/include/asm-generic/mutex-null.h:15:1: warning: "__mutex_fastpath_unlock" redefined
In file included from /usr/src/linux-2.6/arch/x86/include/asm/mutex.h:4,
from /usr/src/linux-2.6/include/linux/mutex.h:19,
from /usr/src/linux-2.6/kernel/mutex.c:20:
/usr/src/linux-2.6/arch/x86/include/asm/mutex_64.h:62:1: warning: this is the location of the previous definition
In file included from /usr/src/linux-2.6/kernel/mutex.c:33:
/usr/src/linux-2.6/include/asm-generic/mutex-null.h:13:1: warning: "__mutex_fastpath_lock" redefined
In file included from /usr/src/linux-2.6/arch/x86/include/asm/mutex.h:4,
from /usr/src/linux-2.6/include/linux/mutex.h:19,
from /usr/src/linux-2.6/kernel/mutex.c:20:
/usr/src/linux-2.6/arch/x86/include/asm/mutex_64.h:19:1: warning: this is the location of the previous definition
In file included from /usr/src/linux-2.6/kernel/mutex.c:33:
/usr/src/linux-2.6/include/asm-generic/mutex-null.h:15:1: warning: "__mutex_fastpath_unlock" redefined
In file included from /usr/src/linux-2.6/arch/x86/include/asm/mutex.h:4,
from /usr/src/linux-2.6/include/linux/mutex.h:19,
from /usr/src/linux-2.6/kernel/mutex.c:20:
/usr/src/linux-2.6/arch/x86/include/asm/mutex_64.h:62:1: warning: this is the location of the previous definition
View attachment "mingo-config" of type "text/x-mpsub" (87252 bytes)
Powered by blists - more mailing lists