[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A084701.1090900@redhat.com>
Date: Mon, 11 May 2009 18:40:49 +0300
From: Avi Kivity <avi@...hat.com>
To: "Langsdorf, Mark" <mark.langsdorf@....com>
CC: Ingo Molnar <mingo@...e.hu>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
"Roedel, Joerg" <Joerg.Roedel@....com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH][KVM][retry 1] Add support for Pause Filtering to AMD
SVM
Langsdorf, Mark wrote:
>> The Linux spinlock is
>>
>> "1:\t"
>> "cmpl %0, %2\n\t"
>> "je 2f\n\t"
>> "rep ; nop\n\t"
>> "movzwl %1, %2\n\t"
>> /* don't need lfence here, because loads are in-order */
>> "jmp 1b\n"
>>
>> 5 instructions, maybe 2-3 cycles, not counting any special rep nop
>> overhead. Mark, any idea what the spin time is?
>>
>
> If I'm understanding the question right, the contested
> spin locks are being held for 5K to 10K iterations of PAUSE.
> So 10K to 30K cycles if your estimate of the spinlock
> cycle time is correct.
>
My estimate is not very reliable. Can you measure this?
btw, I'd expect you'd get much more significant improvement on Windows.
Booting 16-vcpu Windows 2008 x64 took forever on my dual core host, and
my guess is spinlock contention. Of course you'd need a working yield,
as Ingo said schedule() does very little.
--
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