On Thu, 2007-11-01 at 13:03 +0100, Peter Zijlstra wrote:Ok, suppose a tree like so: level 2 cfs_rq A B level 1 cfs_rqA cfs_rqB A0 B0 - B99 So for sake of determinism, we want to impose a period in which all level 1 tasks will have ran (at least) once. Now what sched_slice() does is calculate the weighted proportion of the given period for each task to run, so that each task runs exactly once. Now level 2, can introduce these large weight differences, which in this case result in 'lumps' of time. In the given example above the weight difference is 1:100, which is already at the edges of what regular nice levels could do. How about limiting the max output of sched_slice() to sysctl_sched_latency in order to break up these large stretches of time? Index: linux-2.6/kernel/sched_fair.c =================================================================== --- linux-2.6.orig/kernel/sched_fair.c +++ linux-2.6/kernel/sched_fair.c @@ -341,7 +341,7 @@ static u64 sched_slice(struct cfs_rq *cf do_div(slice, cfs_rq->load.weight); } - return slice; + return min_t(u64, sysctl_sched_latency, slice); } /* -
| Natalie Protasevich | [BUG] New Kernel Bugs |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Andi Kleen | [PATCH x86] [0/16] Various i386/x86-64 changes |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Linus Torvalds | Re: [GIT]: Networking |
| Jeff Kirsher | [net-next PATCH 1/7] e1000e: enable CRC stripping by default |
| Jukka Andberg | ata/wdc vs gcc3 on amiga |
| YAMAMOTO Takashi | Re: wd.c patch to reduce kernel stack usage |
| Jason Thorpe | Re: ksyms patches. |
| rick | NFS transport |
