Re: [PATCH] sched: do not stop ticks when cpu is not idle

From: Ingo Molnar
Date: Fri Jul 18 2008 - 06:54:50 EST



* Ingo Molnar <mingo@xxxxxxx> wrote:

> --- a/kernel/sched.c
> +++ b/kernel/sched.c
> @@ -4446,7 +4446,8 @@ need_resched_nonpreemptible:
> rq->nr_switches++;
> rq->curr = next;
> ++*switch_count;
> -
> + if (rq->curr != rq->idle)
> + tick_nohz_restart_sched_tick();
> context_switch(rq, prev, next); /* unlocks the rq */

hm, one problem i can see is lock dependencies. This code is executed
with the rq lock while tick_nohz_restart_sched_tick() takes hr locks =>
not good. So i havent applied this just yet - this needs to be solved
differently.

Ingo
--
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/