Re: [RFC] sched_tick with interrupts enabled

From: Siddha, Suresh B
Date: Thu Oct 19 2006 - 17:01:22 EST


On Thu, Oct 19, 2006 at 08:50:50AM -0700, Christoph Lameter wrote:
> Ok. Thanks. Would this work?
>
> Index: linux-2.6.19-rc2-mm1/kernel/sched.c
> ===================================================================
> --- linux-2.6.19-rc2-mm1.orig/kernel/sched.c 2006-10-19 09:39:08.000000000 -0500
> +++ linux-2.6.19-rc2-mm1/kernel/sched.c 2006-10-19 09:42:10.733631242 -0500
> @@ -2846,7 +2846,8 @@ static void rebalance_tick(unsigned long
> struct sched_domain *sd;
> int i, scale;
>
> - idle = (current == this_rq->idle) ? SCHED_IDLE : NOT_IDLE;
> + idle = (current == this_rq->idle && !this_rq->nr_running) ?
> + SCHED_IDLE : NOT_IDLE;

A comment of why we are checking for nr_running would be nice.

And one more thing. We can reduce some of the tasklet invoking complexity
by actually checking for a load_balance() need at any domain and thus
invoking tasklet which will do the load balance, rather than unconditionally
invoking tasklet for each tick.

thanks,
suresh
-
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/