On 03/10/2007, Jarek Poplawski <jarkao2@o2.pl> wrote:just a quick patch, not tested and I've not evaluated all possible implications yet. But someone might give it a try with his/(her -- are even more welcomed :-) favourite sched_yield() load. (and white space damaged) --- sched_fair-old.c 2007-10-03 12:45:17.010306000 +0200 +++ sched_fair.c 2007-10-03 12:44:46.899851000 +0200 @@ -803,7 +803,35 @@ static void yield_task_fair(struct rq *r update_curr(cfs_rq); return; + } else if (sysctl_sched_compat_yield == 2) { + unsigned long ideal_runtime, delta_exec, + delta_exec_weighted; + + __update_rq_clock(rq); + /* + * Update run-time statistics of the 'current'. + */ + update_curr(cfs_rq); + + /* + * Emulate (speed up) the effect of us being preempted + * by scheduler_tick(). + */ + ideal_runtime = sched_slice(cfs_rq, curr); + delta_exec = curr->sum_exec_runtime - curr->prev_sum_exec_runtime; + + if (ideal_runtime > delta_exec) { + delta_exec_weighted = ideal_runtime - delta_exec; + + if (unlikely(curr->load.weight != NICE_0_LOAD)) { + delta_exec_weighted = calc_delta_fair(delta_exec_weighted, + &se->load); + } + se->vruntime += delta_exec_weighted; + } + return; } + /* * Find the rightmost entry in the rbtree: */ -- Best regards, Dmitry Adamushko
| Ingo Molnar | Re: x86: 4kstacks default |
| Stephen Rothwell | Re: Announce: Linux-next (Or Andrew's dream :-)) |
| Trent Piepho | [PATCH] [POWERPC] Improve (in|out)_beXX() asm code |
| Rafael J. Wysocki | [Bug #10919] [regression] display dimming is slow and laggy - Acer Travelmate 661lci |
git: | |
| Linus Torvalds | Re: iptables very slow after commit 784544739a25c30637397ace5489eeb6e15d7d49 |
| Andrew Morton | Re: [BUG] New Kernel Bugs |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
