[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20061028105727.A9917@unix-os.sc.intel.com>
Date: Sat, 28 Oct 2006 10:57:27 -0700
From: "Siddha, Suresh B" <suresh.b.siddha@...el.com>
To: Christoph Lameter <clameter@....com>
Cc: akpm@...l.org, Peter Williams <pwil3058@...pond.net.au>,
linux-kernel@...r.kernel.org,
Nick Piggin <nickpiggin@...oo.com.au>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Ingo Molnar <mingo@...e.hu>,
"Siddha, Suresh B" <suresh.b.siddha@...el.com>
Subject: Re: [PATCH 5/7] Move idle stat calculation into rebalance_tick()
On Fri, Oct 27, 2006 at 07:41:38PM -0700, Christoph Lameter wrote:
> Index: linux-2.6.19-rc3/kernel/sched.c
> ===================================================================
> --- linux-2.6.19-rc3.orig/kernel/sched.c 2006-10-27 15:43:45.467245352 -0500
> +++ linux-2.6.19-rc3/kernel/sched.c 2006-10-27 15:45:30.794096498 -0500
> @@ -2849,10 +2849,16 @@ static void update_load(struct rq *this_
> * Balancing parameters are set up in arch_init_sched_domains.
> */
> static void
> -rebalance_tick(int this_cpu, struct rq *this_rq, enum idle_type idle)
> +rebalance_tick(int this_cpu, struct rq *this_rq)
> {
> unsigned long interval;
> struct sched_domain *sd;
> + /*
> + * A task is idle if this is the idle queue
> + * and we have no runnable task
> + */
> + enum idle_type idle = (this_rq->idle && !this_rq->nr_running) ?
> + SCHED_IDLE : NOT_IDLE;
this_rq->idle will always be set to idle task. You wanted to check, if
the current task is idle or not, right? Perhaps we can skip that and
just check for nr_running..
comment needs to be fixed and also please mention that in case of SMT nice,
nr_running will determine if the processor is idle or not(rather than
checking for current task is idle)
thanks,
suresh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists