Re: [tip:sched/urgent] Sched: fix skip_clock_update optimization

From: Yong Zhang
Date: Thu Dec 09 2010 - 21:33:37 EST


On Thu, Dec 9, 2010 at 11:32 PM, Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> wrote:
> On Wed, 2010-12-08 at 20:40 +0000, tip-bot for Mike Galbraith wrote:
>> @@ -4063,6 +4062,8 @@ need_resched_nonpreemptible:
>>
>> Â Â Â Â put_prev_task(rq, prev);
>> Â Â Â Â next = pick_next_task(rq);
>> + Â Â Â clear_tsk_need_resched(prev);
>> + Â Â Â rq->skip_clock_update = 0;
>>
>> Â Â Â Â if (likely(prev != next)) {
>> Â Â Â Â Â Â Â Â sched_info_switch(prev, next);
>> @@ -4071,6 +4072,7 @@ need_resched_nonpreemptible:
>> Â Â Â Â Â Â Â Â rq->nr_switches++;
>> Â Â Â Â Â Â Â Â rq->curr = next;
>> Â Â Â Â Â Â Â Â ++*switch_count;
>> + Â Â Â Â Â Â Â WARN_ON_ONCE(test_tsk_need_resched(next));
>
> I just managed to trigger this one.. will try and reproduce to find out
> wth happened.
>

I don't see it on my side.
Then just show some info(don't know if it's helpful):
wake_up_idle_cpu() can set TIF_RESCHED locklessly.

So does
WARN_ON_ONCE(next != rq->idle && test_tsk_need_resched(next));
help?

Thanks,
Yong


--
Only stand for myself.
--
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/