Re: [Question] sched: Should nr_uninterruptible be decremented in ttwu_do_activate()?

From: Rakib Mullick
Date: Mon Jan 16 2012 - 12:22:09 EST


On Mon, Jan 16, 2012 at 3:22 PM, Michael Wang
<wangyun@xxxxxxxxxxxxxxxxxx> wrote:
> On 01/16/2012 04:27 PM, Rakib Mullick wrote:
>
>> On Mon, Jan 16, 2012 at 1:53 PM, Michael Wang
>
> I saw this is the way to enqueue wake_list:
>
> try_to_wake_up --> p->state = TASK_WAKING; --> ttwu_queue -->
> ttwu_queue_remote --> llist_add(&p->wake_entry, &cpu_rq(cpu)->wake_list)
>
Yes, right and if the task needs to wakeup on a remote CPU, then it
follows an reschedule IPI. But, what I was missing that, I wasn't sure
whether task gets added to wake_list only from ttwu_queue_remote() or
not. Now, I've found that - it is and you are right rq->wake_list only
have TASK_WAKING state.

> BTW, I'm just start to learn scheduler, may be I'm wrong, let's find out
> the right answer :)
>
I think it's quite clear to me now. And you are learning scheduler
well at-least better than me :)

Thanks,
Rakib
--
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/