From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
Mike Galbraith <efault@gmx.de>,
Srivatsa Vaddagiri <vatsa@in.ibm.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: [PATCH 4/4] sched: fix wakeup preemption
Date: Fri, 17 Oct 2008 19:27:05 +0200 [thread overview]
Message-ID: <20081017172829.768067427@chello.nl> (raw)
In-Reply-To: 20081017172701.047939625@chello.nl
[-- Attachment #1: sched-fix-wakeup-preempt.patch --]
[-- Type: text/plain, Size: 1109 bytes --]
In my recent wakeup preempt rework I messed up the asym wakeup.
The idea is that it should be easier to preempt lighter tasks
but not harder to preempt heavier tasks.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
kernel/sched_fair.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: linux-2.6/kernel/sched_fair.c
===================================================================
--- linux-2.6.orig/kernel/sched_fair.c
+++ linux-2.6/kernel/sched_fair.c
@@ -1243,8 +1243,8 @@ static unsigned long wakeup_gran(struct
* More easily preempt - nice tasks, while not making it harder for
* + nice tasks.
*/
- if (sched_feat(ASYM_GRAN))
- gran = calc_delta_mine(gran, NICE_0_LOAD, &se->load);
+ if (sched_feat(ASYM_GRAN) && se->load.weight < NICE_0_LOAD)
+ gran = (gran * se->load.weight) >> NICE_0_SHIFT;
return gran;
}
@@ -1296,7 +1296,7 @@ static void check_preempt_wakeup(struct
}
delta_exec = se->sum_exec_runtime - se->prev_sum_exec_runtime;
- if (delta_exec > wakeup_gran(pse))
+ if (delta_exec > wakeup_gran(se))
resched_task(curr);
}
--
next prev parent reply other threads:[~2008-10-17 17:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-17 17:27 [PATCH 0/4] pending scheduler updates Peter Zijlstra
2008-10-17 17:27 ` [PATCH 1/4] sched: optimize group load balancer Peter Zijlstra
2008-10-17 17:27 ` [PATCH 2/4] sched: fair scheduler should not resched rt tasks Peter Zijlstra
2008-10-17 17:27 ` [PATCH 3/4] sched: revert back to per-rq vruntime Peter Zijlstra
2008-10-17 17:27 ` Peter Zijlstra [this message]
2008-10-20 21:57 ` [PATCH 4/4] sched: fix wakeup preemption Chris Friesen
2008-10-20 12:05 ` [PATCH 0/4] pending scheduler updates Ingo Molnar
2008-10-21 17:35 ` Srivatsa Vaddagiri
2008-10-22 9:40 ` Ingo Molnar
2008-10-22 10:03 ` Mike Galbraith
2008-10-22 10:32 ` Mike Galbraith
2008-10-22 12:10 ` Ingo Molnar
2008-10-22 12:38 ` Mike Galbraith
2008-10-22 12:42 ` Ingo Molnar
2008-10-22 13:05 ` Mike Galbraith
2008-10-22 17:38 ` Peter Zijlstra
2008-10-22 17:56 ` Mike Galbraith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081017172829.768067427@chello.nl \
--to=a.p.zijlstra@chello.nl \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=vatsa@in.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox