Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=91c234b4e3419c786cac2d5b7a7b96443e512e3a
Commit:     91c234b4e3419c786cac2d5b7a7b96443e512e3a
Parent:     fb7dde37ece82e13de383afd7042c45df67a9d17
Author:     Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 15 17:00:18 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Mon Oct 15 17:00:18 2007 +0200

    sched: do not wakeup-preempt with SCHED_BATCH tasks
    
    do not wakeup-preempt with SCHED_BATCH tasks, their preemption
    is batched too, driven by the tick.
    
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 kernel/sched_fair.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index ec1592e..c240b72 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -828,6 +828,12 @@ static void check_preempt_wakeup(struct rq *rq, struct 
task_struct *p)
                resched_task(curr);
                return;
        }
+       /*
+        * Batch tasks do not preempt (their preemption is driven by
+        * the tick):
+        */
+       if (unlikely(p->policy == SCHED_BATCH))
+               return;
 
        if (sched_feat(WAKEUP_PREEMPT)) {
                while (!is_same_group(se, pse)) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to