[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200807081101.56004.rusty@rustcorp.com.au>
Date: Tue, 8 Jul 2008 11:01:55 +1000
From: Rusty Russell <rusty@...tcorp.com.au>
To: Jeremy Fitzhardinge <jeremy@...p.org>
Cc: virtualization@...ts.linux-foundation.org,
Nick Piggin <nickpiggin@...oo.com.au>,
Jens Axboe <axboe@...nel.dk>,
Xen devel <xen-devel@...ts.xensource.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Christoph Lameter <clameter@...ux-foundation.org>,
Petr Tesarik <ptesarik@...e.cz>,
LKML <linux-kernel@...r.kernel.org>,
Thomas Friebel <thomas.friebel@....com>,
Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH RFC 0/4] Paravirtual spinlocks
On Tuesday 08 July 2008 10:37:54 Jeremy Fitzhardinge wrote:
> Rusty Russell wrote:
> > On Tuesday 08 July 2008 05:07:49 Jeremy Fitzhardinge wrote:
> >> At the most recent Xen Summit, Thomas Friebel presented a paper
> >> ("Preventing Guests from Spinning Around",
> >> http://xen.org/files/xensummitboston08/LHP.pdf) investigating the
> >> interactions between spinlocks and virtual machines. Specifically, he
> >> looked at what happens when a lock-holding VCPU gets involuntarily
> >> preempted.
> >
> > I find it interesting that gang scheduling the guest was not suggested as
> > an obvious solution.
>
> It's an obvious answer, but not an obvious solution. You trade off
> wasting time spinning vs wasting time waiting for N vcpus to be free for
> scheduling.
Perhaps, but with huge numbers of cores (as The Future seems to promise) and
significant overcommit not sure how bad this would be.
> Or something; seems much more complex, particularly if you
> can do a small guest tweak to solve the problem.
But AFAICT it's one of a related set of problems where all VCPUs are required
for a task. Hackbench comes to mind. There's going to be a lot of
ping-ponging and you'll approach gang scheduling to get decent performance.
> > A little disappointing that you can't patch your version inline.
>
> Spinlock code isn't inlined currently, so I hadn't considered it. The
> fast path code for both lock and unlock is nearly small enough to
> consider it, but it seems a bit fiddly.
Yeah, OK.
Thanks,
Rusty.
--
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