[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E6F41EB.1040106@redhat.com>
Date: Tue, 13 Sep 2011 14:43:39 +0300
From: Avi Kivity <avi@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
CC: Huang Ying <ying.huang@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, Andi Kleen <andi@...stfloor.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: Re: [PATCH 8/5] llist: Remove cpu_relax() usage in cmpxchg loops
On 09/12/2011 05:32 PM, Peter Zijlstra wrote:
> On Mon, 2011-09-12 at 17:26 +0300, Avi Kivity wrote:
> > On 09/12/2011 05:05 PM, Peter Zijlstra wrote:
> > > Subject: llist: Remove cpu_relax() usage in cmpxchg loops
> > > From: Peter Zijlstra<a.p.zijlstra@...llo.nl>
> > > Date: Mon Sep 12 15:50:49 CEST 2011
> > >
> > > Initial benchmarks show they're a net loss (2 socket wsm):
> > >
> > > $ for i in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor ; do echo performance> $i; done
> > > $ echo 4096 32000 64 128> /proc/sys/kernel/sem
> > > $ ./sembench -t 2048 -w 1900 -o 0
> > >
> >
> > We hyperthreading enabled, and were all threads loaded? cpu_relax
> > allows the other thread to make more progress while the spinner relaxes.
>
> Yeah, with HT enabled, the benchmark runs 2048 tasks and does 1900 task
> bulk wakeups or so. Forgot the details, but it basically stresses the
> sleep+wakeup paths like nobodies business.
Ok.
Another issue is that hypervisors use PAUSE to detect a spinning guest
and issue a directed yield to another vcpu. But for cmpxchg loops, the
"spinner" would just commit on the next loop, no? So I think there's no
objection from that front.
--
error compiling committee.c: too many arguments to function
--
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