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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 11 May 2009 16:42:17 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Avi Kivity <avi@...hat.com>
Cc:	Ingo Molnar <mingo@...e.hu>,
	Mark Langsdorf <mark.langsdorf@....com>,
	Joerg Roedel <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

On Mon, 2009-05-11 at 17:24 +0300, Avi Kivity wrote:

> > I.e. this is a somewhat poor solution as far as scheduling goes. But 
> > i'm wondering what the CPU side does. Can REP-NOP really take 
> > thousands of cycles? If yes, under what circumstances?
> >   
> 
> The guest is running rep-nop in a loop while trying to acquire a 
> spinlock.  The hardware detects this (most likely, repeated rep-nop with 
> the same rip) and exits.  We can program the loop count; obviously if 
> we're spinning for only a short while it's better to keep spinning while 
> hoping the lock will be released soon.
> 
> The idea is to detect that the guest is not making forward progress and 
> yield.  If I could tell the scheduler, you may charge me a couple of 
> milliseconds, I promise not to sue, that would be ideal.  Other tasks 
> can become eligible, hopefully the task holding the spinlock, and by the 
> time we're scheduled back the long running task will have finished and 
> released the lock.
> 
> For newer Linux as a guest we're better off paravirtualizing this, so we 
> can tell the host which vcpu holds the lock; in this case kvm will want 
> to say, take a couple milliseconds off my account and transfer it to 
> this task (so called directed yield).  However there's no reason to 
> paravirtualize all cpu_relax() calls.

So we're now officially giving up on (soft) realtime virtualization?

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