Re: [PATCH 5/7] Move idle stat calculation into rebalance_tick()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 28 Oct 2006, Siddha, Suresh B wrote:

> 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)

Ah.. Thanks! Would this be okay?

Index: linux-2.6.19-rc3/kernel/sched.c
===================================================================
--- linux-2.6.19-rc3.orig/kernel/sched.c	2006-10-28 20:00:07.000000000 -0500
+++ linux-2.6.19-rc3/kernel/sched.c	2006-10-28 20:04:08.721364884 -0500
@@ -2869,10 +2869,10 @@ static void rebalance_domains(unsigned l
 	unsigned long interval;
 	struct sched_domain *sd;
 	/*
-	 * A task is idle if this is the idle queue
-	 * and we have no runnable task
+	 * We are idle if there are no processes running. This
+	 * is valid even if we are the idle process (SMT).
 	 */
-	enum idle_type idle = (this_rq->idle && !this_rq->nr_running) ?
+	enum idle_type idle = !this_rq->nr_running ?
 				SCHED_IDLE : NOT_IDLE;
 	/* Earliest time when we have to call rebalance_domains again */
 	unsigned long next_balance = jiffies + 60*HZ;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux