login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
March
»
14
Re: Stolen and degraded time and schedulers
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Con Kolivas
Subject:
Re: Stolen and degraded time and schedulers
Date: Wednesday, March 14, 2007 - 2:40 pm
On Thursday 15 March 2007 08:36, Con Kolivas wrote:
quoted text
> On Wednesday 14 March 2007 03:31, Jeremy Fitzhardinge wrote: > > The current Linux scheduler makes one big assumption: that 1ms of CPU > > time is the same as any other 1ms of CPU time, and that therefore a > > process makes the same amount of progress regardless of which particular > > ms of time it gets. > > > > This assumption is wrong now, and will become more wrong as > > virtualization gets more widely used. > > > > It's wrong now, because it fails to take into account of several kinds > > of missing time: > > > > 1. interrupts - time spent in an ISR is accounted to the current > > process, even though it gets no direct benefit > > 2. SMM - time is completely lost from the kernel > > 3. slow CPUs - 1ms of 600MHz CPU is less useful than 1ms of 2.4GHz CPU > > > > The first two - time lost to interrupts - are a well known problem, and > > are generally considered to be a non issue. If you're losing a > > significant amount of time to interrupts, you probably have bigger > > problems. (Or maybe not?) > > > > The third is not something I've seen discussed before, but it seems like > > it could be a significant problem today. Certainly, I've noticed it > > myself: an interactive program decides to do something CPU-intensive > > (like start an animation), and it chugs until the conservative governor > > brings the CPU up to speed. Certainly some of this is because its just > > plain CPU-starved, but I think another factor is that it gets penalized > > for running on a slow CPU: 1ms is not 1ms. And for power reasons you > > want to encourage processes to run on slow CPUs rather than penalize > > them. > > > > Virtualization just exacerbates this. If you have a busy machine > > running multiple virtual CPUs, then each VCPU may only get a small > > proportion of the total amount of available CPU time. If the kernel's > > scheduler asserts that "you were just scheduled for 1ms, therefore you > > made 1ms of progress", then many timeslices will effectively end up > > being 1ms of 0Mhz CPU - because the VCPU wasn't scheduled and the real > > CPU was doing something else. > > > > > > So how to deal with this? Basically we need a clock which measures "CPU > > work units", and have the scheduler use this clock. > > > > A "CPU work unit" clock has these properties: > > > > * inherently per-CPU (from the kernel's perspective, so it would be > > per-VCPU in a virtual machine) > > * monotonic - you can't do negative work > > * measured in "work units" > > > > A "work unit" is probably most simply expressed in cycles - you assume a > > cycle of CPU time is equivalent in terms of work done to any other > > cycle. This means that 1 cycle at 600MHz is equivalent to 1 cycle at > > 2.4GHz - but of course the 2.4GHz processor gets 4 times as many in any > > real time interval. (This is the instance where the worst kind of tsc - > > varying speed which stops on idle - is actually exactly what you want.) > > > > You could also measure "work units" in terms of normalized time units: > > if the fastest CPU on the machine is 2.4GHz, then 1ms is 1ms a work unit > > on that CPU, but 250us on the 600MHz CPU. > > > > It doesn't really matter what the unit is, so long as it is used > > consistently to measure how much progress all processes made. > > I think you're looking for a complex solution to a problem that doesn't > exist. The job of the process scheduler is to meter out the available cpu > resources. It cannot make up cycles for a slow cpu or one that is > throttled. If the problem is happening due to throttling it should be fixed > by altering the throttle. The example you describe with the conservative > governor is as easy to fix as changing to the ondemand governor. > Differential power cpus on an SMP machine should be managed by SMP > balancing choices based on power groups. > > It would be fine to implement some other accounting of this definition of > time for other purposes
I mean such as for virtualisation purposes.
quoted text
> but not for process scheduler decisions per se.
quoted text
> > Sorry to chime in late. My physical condition prevents me spending any > extended period of time at the computer so I've tried to be succinct with > my comments and may not be able to reply again.
-- -ck -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
Stolen and degraded time and schedulers
, Jeremy Fitzhardinge
, (Tue Mar 13, 9:31 am)
Re: Stolen and degraded time and schedulers
, john stultz
, (Tue Mar 13, 1:12 pm)
Re: Stolen and degraded time and schedulers
, Jeremy Fitzhardinge
, (Tue Mar 13, 1:32 pm)
Re: Stolen and degraded time and schedulers
, Daniel Walker
, (Tue Mar 13, 2:27 pm)
Re: Stolen and degraded time and schedulers
, Jeremy Fitzhardinge
, (Tue Mar 13, 2:59 pm)
Re: Stolen and degraded time and schedulers
, Dan Hecht
, (Tue Mar 13, 5:43 pm)
Re: Stolen and degraded time and schedulers
, Daniel Walker
, (Tue Mar 13, 7:00 pm)
Re: Stolen and degraded time and schedulers
, Jeremy Fitzhardinge
, (Tue Mar 13, 9:37 pm)
Re: Stolen and degraded time and schedulers
, Jeremy Fitzhardinge
, (Tue Mar 13, 11:52 pm)
Re: Stolen and degraded time and schedulers
, Zan Lynx
, (Wed Mar 14, 1:20 am)
Re: Stolen and degraded time and schedulers
, Lennart Sorensen
, (Wed Mar 14, 6:58 am)
Re: Stolen and degraded time and schedulers
, Jeremy Fitzhardinge
, (Wed Mar 14, 8:08 am)
Re: Stolen and degraded time and schedulers
, Lennart Sorensen
, (Wed Mar 14, 8:12 am)
Re: Stolen and degraded time and schedulers
, Daniel Walker
, (Wed Mar 14, 9:11 am)
Re: Stolen and degraded time and schedulers
, Jeremy Fitzhardinge
, (Wed Mar 14, 9:37 am)
Re: Stolen and degraded time and schedulers
, Daniel Walker
, (Wed Mar 14, 9:59 am)
Re: Stolen and degraded time and schedulers
, Jeremy Fitzhardinge
, (Wed Mar 14, 10:08 am)
Re: Stolen and degraded time and schedulers
, Daniel Walker
, (Wed Mar 14, 11:06 am)
Re: Stolen and degraded time and schedulers
, Jeremy Fitzhardinge
, (Wed Mar 14, 11:41 am)
Re: Stolen and degraded time and schedulers
, Daniel Walker
, (Wed Mar 14, 12:00 pm)
Re: Stolen and degraded time and schedulers
, Dan Hecht
, (Wed Mar 14, 12:02 pm)
Re: Stolen and degraded time and schedulers
, Jeremy Fitzhardinge
, (Wed Mar 14, 12:34 pm)
Re: Stolen and degraded time and schedulers
, Jeremy Fitzhardinge
, (Wed Mar 14, 12:44 pm)
Re: Stolen and degraded time and schedulers
, Rik van Riel
, (Wed Mar 14, 12:45 pm)
Re: Stolen and degraded time and schedulers
, Jeremy Fitzhardinge
, (Wed Mar 14, 12:47 pm)
Re: Stolen and degraded time and schedulers
, Rik van Riel
, (Wed Mar 14, 1:02 pm)
Re: Stolen and degraded time and schedulers
, Dan Hecht
, (Wed Mar 14, 1:26 pm)
Re: Stolen and degraded time and schedulers
, Jeremy Fitzhardinge
, (Wed Mar 14, 1:31 pm)
Re: Stolen and degraded time and schedulers
, Daniel Walker
, (Wed Mar 14, 1:33 pm)
Re: Stolen and degraded time and schedulers
, Ingo Molnar
, (Wed Mar 14, 1:38 pm)
Re: Stolen and degraded time and schedulers
, Dan Hecht
, (Wed Mar 14, 1:46 pm)
Re: Stolen and degraded time and schedulers
, Jeremy Fitzhardinge
, (Wed Mar 14, 1:59 pm)
Re: Stolen and degraded time and schedulers
, Jeremy Fitzhardinge
, (Wed Mar 14, 2:16 pm)
Re: Stolen and degraded time and schedulers
, Jeremy Fitzhardinge
, (Wed Mar 14, 2:18 pm)
Re: Stolen and degraded time and schedulers
, Daniel Walker
, (Wed Mar 14, 2:34 pm)
Re: Stolen and degraded time and schedulers
, Con Kolivas
, (Wed Mar 14, 2:36 pm)
Re: Stolen and degraded time and schedulers
, Jeremy Fitzhardinge
, (Wed Mar 14, 2:38 pm)
Re: Stolen and degraded time and schedulers
, Con Kolivas
, (Wed Mar 14, 2:40 pm)
Re: Stolen and degraded time and schedulers
, Jeremy Fitzhardinge
, (Wed Mar 14, 2:42 pm)
Re: Stolen and degraded time and schedulers
, Paul Mackerras
, (Wed Mar 14, 10:23 pm)
Re: Stolen and degraded time and schedulers
, Dan Hecht
, (Thu Mar 15, 12:09 pm)
Re: Stolen and degraded time and schedulers
, Jeremy Fitzhardinge
, (Thu Mar 15, 12:18 pm)
Re: Stolen and degraded time and schedulers
, Jeremy Fitzhardinge
, (Thu Mar 15, 12:33 pm)
Re: Stolen and degraded time and schedulers
, Rik van Riel
, (Thu Mar 15, 12:48 pm)
Re: Stolen and degraded time and schedulers
, Jeremy Fitzhardinge
, (Thu Mar 15, 12:53 pm)
Re: Stolen and degraded time and schedulers
, Dan Hecht
, (Thu Mar 15, 1:07 pm)
Re: Stolen and degraded time and schedulers
, Rik van Riel
, (Thu Mar 15, 1:14 pm)
Re: Stolen and degraded time and schedulers
, Dan Hecht
, (Thu Mar 15, 1:35 pm)
Re: Stolen and degraded time and schedulers
, Ingo Molnar
, (Fri Mar 16, 1:38 am)
Re: Stolen and degraded time and schedulers
, Martin Schwidefsky
, (Fri Mar 16, 1:59 am)
Re: Stolen and degraded time and schedulers
, Jeremy Fitzhardinge
, (Fri Mar 16, 9:53 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Ken Chen
[patch] sched: fix inconsistency when redistribute per-cpu tg->cfs_rq shares.
Ingo Molnar
Re: [PATCH v3] x86: merge the simple bitops and move them to bitops.h
Jan Engelhardt
Re: [PATCH] Allow Kconfig to set default mmap_min_addr protection
Dmitry Torokhov
Re: [2.6 patch] input/serio/hp_sdc.c section fix
Rafael J. Wysocki
[Bug #16380] Loop devices act strangely in 2.6.35
git
:
Steven Grimm
Using git as a general backup mechanism (was Re: Using GIT to store /etc)
Jeff King
Re: [PATCH] git-reset: allow --soft in a bare repo
Johannes Sixt
Re: [PATCH 01/14] msvc: Fix compilation errors in compat/win32/sys/poll.c
Johannes Schindelin
Re: [PATCH] Uninstall rule for top level Makefile
Shawn O. Pearce
Re: [PATCH v2] Speed up bash completion loading
git-commits-head
:
Linux Kernel Mailing List
cgroups: clean up cgroup_pidlist_find() a bit
Linux Kernel Mailing List
sony-laptop: Add support for extended hotkeys
Linux Kernel Mailing List
IB/core: Add support for masked atomic operations
Linux Kernel Mailing List
V4L/DVB (8939): cx18: fix sparse warnings
Linux Kernel Mailing List
ipv6 mcast: Check address family of gf_group in getsockopt(MS_FILTER).
linux-netdev
:
Inaky Perez-Gonzalez
[PATCH 40/40] wimax/i2400m: add CREDITS and MAINTAINERS entries
Karsten Keil
[mISDN PATCH v2 05/19] Reduce stack size in dsp_cmx_send()
linux
Re: 2.6.23-rc8 network problem. Mem leak? ip1000a?
David Miller
Re: tun: Use netif_receive_skb instead of netif_rx
David Miller
Re: [net-next PATCH v2] llc enhancements
freebsd-current
:
Matthew Fleming
Re: [RFC] Outline of USB process integration in the kernel taskqueue system
illoai@gmail.com
Re: OT: 2d password
Hartmut Brandt
Re: problem with nss_ldap
Andrew Reilly
Re: FreeBSD's problems as seen by the BSDForen.de community
Max Laier
Re: Upcoming ABI Breakage in RELENG_7
Colocation donated by:
Syndicate