[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1274348969.5605.13741.camel@twins>
Date: Thu, 20 May 2010 11:49:29 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Suresh Siddha <suresh.b.siddha@...el.com>
Cc: Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
Arjan van de Ven <arjan@...ux.jf.intel.com>,
Venkatesh Pallipadi <venki@...gle.com>,
Vaidyanathan Srinivasan <svaidy@...ux.vnet.ibm.com>,
ego@...ibm.com, LKML <linux-kernel@...r.kernel.org>,
Dominik Brodowski <linux@...inikbrodowski.net>,
Nigel Cunningham <ncunningham@...a.org.au>
Subject: Re: [patch 6/7] sched: change nohz.load_balancer to be nr_cpu_ids
based
On Mon, 2010-05-17 at 11:27 -0700, Suresh Siddha wrote:
> int get_nohz_load_balancer(void)
> {
> - return atomic_read(&nohz.load_balancer);
> + int load_balancer = atomic_read(&nohz.load_balancer);
> + if (load_balancer >= nr_cpu_ids)
> + return nr_cpu_ids;
> +
> + return load_balancer;
> }
How could it ever be > nr_cpu_ids, and thus, do we need that
conditional?
--
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