On Sun, 2007-09-23 at 23:21 -0700, Tong Li wrote:Hmm. I can imagine Mondo-Boxen-R-Us folks getting upset with that. Better would be like Ingo said, see if we can toss sync_vrintime(), and I've been playing with that... I found something this morning, and as usual, the darn thing turned out to be dirt simple. With sync_vruntime() disabled, I found queues with negative min_vruntime right from boot, and went hunting. Adding some instrumentation to set_task_cpu() (annoying consequences), I found the below: Legend: vrun: tasks's vruntime old: old queue's min_vruntime new: new queue's min_vruntime result: what's gonna happen [ 60.214508] kseriod vrun: 1427596999 old: 15070988657 new: 4065818654 res: -9577573004 [ 218.274661] konqueror vrun: 342076210254 old: 658982966338 new: 219203403598 res: -97703352486 [ 218.284657] init vrun: 411638725179 old: 659187735208 new: 219203492472 res: -28345517557 [...] A task which hasn't run in long enough for queues to have digressed further than it's vruntime is going to end up with a negative vruntime. Looking at place_entity(), it looks like it's supposed to fix that up, but due to the order of arguments passed to max_vrintime(), and the unsigned comparison therein, it won't. Running with the patchlet below, my box _so far_ has not become terminally unhappy despite spread0. I'm writing this with the pinned hogs test running right now, and all is well, so I _think_ it might be ok to just remove sync_vruntime() after all. diff -uprNX /root/dontdiff git/linux-2.6.sched-devel/kernel/sched_fair.c linux-2.6.23-rc7.d/kernel/sched_fair.c --- git/linux-2.6.sched-devel/kernel/sched_fair.c 2007-09-23 14:48:18.000000000 +0200 +++ linux-2.6.23-rc7.d/kernel/sched_fair.c 2007-09-24 11:02:05.000000000 +0200 @@ -117,7 +117,7 @@ static inline struct task_struct *task_o static inline u64 max_vruntime(u64 min_vruntime, u64 vruntime) { - if ((vruntime > min_vruntime) || + if (((s64)vruntime > (s64)min_vruntime) || (min_vruntime > (1ULL << 61) && vruntime < (1ULL << 50))) min_vruntime = vruntime; @@ -310,7 +310,7 @@ static void update_curr(struct cfs_rq *c unsigned long delta_exec; if (unlikely(!cfs_rq->nr_running)) - return sync_vruntime(cfs_rq); + return ;//sync_vruntime(cfs_rq); if (unlikely(!curr)) return; -
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| James Bottomley | Re: Announce: Linux-next (Or Andrew's dream :-)) |
| David Woodhouse | Re: [PATCH 2/3] firmware: convert korg1212 driver to use firmware loader exclusively |
| Kamalesh Babulal | Re: 2.6.24-rc8-mm1 Build Failure on S390x |
git: | |
| David Miller | [GIT]: Networking |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| KOSAKI Motohiro | [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
