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] [thread-next>] [day] [month] [year] [list]
Message-ID: <4D2F1510.3000809@redhat.com>
Date:	Thu, 13 Jan 2011 10:06:56 -0500
From:	Rik van Riel <riel@...hat.com>
To:	Avi Kivity <avi@...hat.com>
CC:	kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
	Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Mike Galbraith <efault@....de>,
	Chris Wright <chrisw@...s-sol.org>
Subject: Re: [RFC -v4 PATCH 3/3] kvm: use yield_to instead of sleep in kvm_vcpu_on_spin

On 01/13/2011 08:16 AM, Avi Kivity wrote:

>> + for (pass = 0; pass< 2&& !yielded; pass++) {
>> + kvm_for_each_vcpu(i, vcpu, kvm) {
>> + struct task_struct *task = vcpu->task;
>> + if (!pass&& i< last_boosted_vcpu) {
>> + i = last_boosted_vcpu;
>> + continue;
>> + } else if (pass&& i> last_boosted_vcpu)
>> + break;
>> + if (vcpu == me)
>> + continue;
>> + if (!task)
>> + continue;
>> + if (waitqueue_active(&vcpu->wq))
>> + continue;
>
> Suppose the vcpu exits at this point, and its task terminates.

Arghh, good point.

> I think the first patch needs some reference counting... I'd move it to
> the outermost KVM_RUN loop to reduce the performance impact.

I don't see how refcounting from that other thread could
possibly help, and I now see that the task_struct_cachep
does not have SLAB_DESTROY_BY_LRU, either :(

What do you have in mind here that would both work and
be acceptable to you as KVM maintainer?

-- 
All rights reversed
--
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