Re: [PATCH 06/40] sched: add wakeup/sleep sched_notifiers and allowNULL notifier ops
From: Tejun Heo
Date: Mon Jan 18 2010 - 19:59:21 EST
On 01/18/2010 09:49 PM, Peter Zijlstra wrote:
> On Mon, 2010-01-18 at 20:31 +0900, Tejun Heo wrote:
>> On 01/18/2010 06:57 PM, Peter Zijlstra wrote:
>>> On Mon, 2010-01-18 at 09:57 +0900, Tejun Heo wrote:
>>>> @@ -2439,6 +2440,8 @@ static inline void ttwu_post_activation(struct task_struct *p, struct rq *rq,
>>>> rq->idle_stamp = 0;
>>>> + if (success)
>>>> + fire_sched_notifiers(p, wakeup);
>>> So why can't you call fire_sched_notifier(p, wakeup) right next to
>>> activate_task(rq, p, 1) in ttwu_activate() ?
>> I was worried about calling notifier callback before notifying the
>> sched_class of the wakeup. Conceptually, the notifier callback should
>> be called after all sched internal stuff about the wakeup finish,
> I'm thinking that we can place it next to activate_task(), if it makes
> you feel better you can place them both at the end up ttwu_activate()
> instead of in the middle.
> Esp. with the callback you have it really doesn't matter.
Alright, if it's safe, there's no reason to keep it separate with an
extra branch. I'll move it.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/