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:	Tue, 13 Mar 2007 15:01:29 +0100
From:	Andi Kleen <ak@....de>
To:	Zachary Amsden <zach@...are.com>
Cc:	Linus Torvalds <torvalds@...l.org>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Jeremy Fitzhardinge <jeremy@...p.org>,
	Chris Wright <chrisw@...s-sol.org>,
	Dan Hecht <dhecht@...are.com>, Dan Arai <arai@...are.com>,
	Andrew Morton <akpm@...l.org>,
	Virtualization Mailing List <virtualization@...ts.osdl.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Daniel Walker <dwalker@...sta.com>
Subject: Re: [PATCH 2/9] Sched clock paravirt op fix.patch

On Thu, Mar 01, 2007 at 06:54:24PM -0800, Zachary Amsden wrote:
> The custom_sched_clock hook is broken.  The result from sched_clock needs to be
> in nanoseconds, not in CPU cycles.  The TSC is insufficient for this purpose,
> because TSC is poorly defined in a virtual environment, and mostly represents
> real world time instead of scheduled process time (which can be interrupted
> without notice when a virtual machine is descheduled).
> 
> To make the scheduler consistent, we must expose a different nature of time,
> that is scheduled time.  So deprecate this custom_sched_clock hack and turn it
> into a paravirt-op, as it should have been all along.  This allows the tsc.c
> code which converts cycles to nanoseconds to be shared by all paravirt-ops
> backends.
> 
> It is unfortunate to add a new paravirt-op, but this is a very distinct
> abstraction which is clearly different for all virtual machine implementations,
> and it gets rid of an ugly indirect function which I ashamedly admit I hacked
> in to try to get this to work earlier, and then even got in the wrong units.
> 
> Please apply.

I think it's better to remove this completely and not allow paravirt
to hook into sched_clock.  After all a hypervisor stealing time is no
different from interrupts stealing time and we don't try to handle
that either. 

I will remove the custom hook.

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