[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48FCFEC1.9000800@nortel.com>
Date: Mon, 20 Oct 2008 15:57:21 -0600
From: "Chris Friesen" <cfriesen@...tel.com>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
CC: Ingo Molnar <mingo@...e.hu>, LKML <linux-kernel@...r.kernel.org>,
Mike Galbraith <efault@....de>,
Srivatsa Vaddagiri <vatsa@...ibm.com>
Subject: Re: [PATCH 4/4] sched: fix wakeup preemption
Peter Zijlstra wrote:
> 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.
> 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;
> }
Setting aside whether the asym wakeup is desirable, the code looks
reasonable but I think you need to change the code comments as well.
The proposed code only affects with a weight of less than NICE_0_LOAD,
ie. +nice tasks. The comment suggests the opposite.
Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists