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]
Message-ID: <20070114085116.GD2913@elte.hu>
Date:	Sun, 14 Jan 2007 09:51:16 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Dor Laor <dor.laor@...ranet.com>
Cc:	Avi Kivity <avik@...ranet.com>,
	kvm-devel <kvm-devel@...ts.sourceforge.net>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [kvm-devel] kvm & dyntick


* Dor Laor <dor.laor@...ranet.com> wrote:

> Afterwards we'll need to compensate the lost alarm signals to the 
> guests by using one of
>  - hrtimers to inject the lost interrupts for specific guests. The 
> problem this will increase the overall load.
>  - Injecting several virtual irq to the guests one after another 
> (using interrupt window exit). The question is how the guest will be 
> effected from this unfair behavior.

well, the most important thing would be to fix qemu to:

 - not use a 1024 /dev/rtc stream of signals as its clock emulation 
   source

i hacked that out of qemu, only to find out that qemu then uses periodic 
itimers. Instead of that it should use one-shot itimers, driven by the 
expiry time of the next clock. I.e. this code in vl.c, in 
host_alarm_handler():

    if (qemu_timer_expired(active_timers[QEMU_TIMER_VIRTUAL],
                           qemu_get_clock(vm_clock)) ||
        qemu_timer_expired(active_timers[QEMU_TIMER_REALTIME],
                           qemu_get_clock(rt_clock))) {

should start an itimer with an expiry time of:

 active_timers[QEMU_TIMER_VIRTUAL]->expire_time - qemu_get_clock(vm_clock)

or:

 active_timers[QEMU_TIMER_REALTIME]->expire_time - qemu_get_clock(rt_clock)

whichever is smaller. Furthermore, whenever timer->expire_time is 
changed in qemu_mod_timer(), this set-the-next-itimer-expiry-time code 
needs to be called. Would anyone like to try that?

this will reduce the host Qemu wakeup rate from 1000-1100/sec to the 
guest's 4-5/sec wakeup rate - resulting in 0.01% CPU overhead from a 
single idle guest. Current unmodified Qemu causes 10-20% CPU overhead 
from a single idle guest.

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