lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sat, 17 Apr 2010 22:02:46 +0300
From:	Avi Kivity <avi@...hat.com>
To:	"Zhang, Xiantao" <xiantao.zhang@...el.com>
CC:	"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
	Marcelo Tosatti <mtosatti@...hat.com>,
	"Yang, Xiaowei" <xiaowei.yang@...el.com>,
	"Dong, Eddie" <eddie.dong@...el.com>, "Li, Xin" <xin.li@...el.com>,
	Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <peterz@...radead.org>,
	Mike Galbraith <efault@....de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: VM performance issue in KVM guests.

On 04/16/2010 05:27 AM, Zhang, Xiantao wrote:
>
>
>> When vcpus are pinned to pcpus, there is a 50% chance that a guest's
>> vcpus will be co-scheduled and spinlocks will perform will.
>>
>> When vcpus are not pinned, but affine wakeups are disabled, there is a
>> 33% chance that vcpus will be co-scheduled.
>>
>> When vcpus are not pinned and affine wakeups are enabled there is a 0%
>> chance that vcpus will be co-scheduled.
>>
>> Keeping both vcpus on the same core actually makes sense since they
>> can communicate through the local cache faster than across cores.
>> What we need is to make sure that they don't spin.
>>
>> Windows 2008 can report spinlock spinning through a hypercall.  Can
>> you hook to that interface and see if it happens regularly?
>> Altenatively use a PLE capable host and trace the kvm_vcpu_on_spin()
>> function.
>>      
> We only tried windows 2003 for the experiments, and have no data related to windows 2008.
> But maybe we can have  a try later.  Anyway, the key point is we have to enhance the scheduler to let it
> Know which threads are vcpu threads to avoid perf loss in this case.
>    

I have two worries about this approach:

1.  Affine wakeups were introduced for a reason; if we disable them 
(even just for vcpus), we lost something.  Maybe we can tune the 
mechanism not to fail, instead of disabling it.

2.  Affine wakeups are a scheduler internal detail.  How do we explain 
what it does?  the scheduler may not have affine wakeups in a few years, 
yet we'll have an ABI to disable them.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ