[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1334657383.28150.78.camel@twins>
Date: Tue, 17 Apr 2012 12:09:43 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: "Chen, Dennis (SRDC SW)" <Dennis1.Chen@....com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
"paulmck@...ux.vnet.ibm.com" <paulmck@...ux.vnet.ibm.com>,
Paul Mackerras <paulus@...ba.org>,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Subject: Re: A quick view of the performance benchmark for semaphore-like
and mutex
On Tue, 2012-04-17 at 09:36 +0000, Chen, Dennis (SRDC SW) wrote:
> Just as a quick & rough test, with below changes based on mutex (almost the same as semaphore):
>
> --- /home/dennis/Linux/linux-3.3.2-sem/kernel/mutex.c 2012-04-17 14:59:49.823177615 +0800
> +++ ./mutex.c 2012-04-17 17:00:12.963059284 +0800
> @@ -140,6 +140,7 @@ __mutex_lock_common(struct mutex *lock,
> preempt_disable();
> mutex_acquire_nest(&lock->dep_map, subclass, 0, nest_lock, ip);
>
> +#if 0
> #ifdef CONFIG_MUTEX_SPIN_ON_OWNER
> /*
> * Optimistic spinning.
> @@ -195,6 +196,7 @@ __mutex_lock_common(struct mutex *lock,
> arch_mutex_cpu_relax();
> }
> #endif
> +#endif
> spin_lock_mutex(&lock->wait_lock, flags);
>
> debug_mutex_lock_common(lock, &waiter);
or you do:
echo NO_OWNER_SPIN > /debug/sched_features
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists