[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHGf_=o4PcPh3bJU8gFzGXtKeXCkdmrvfOZ2nUDc_epf1tnNyA@mail.gmail.com>
Date: Fri, 20 Jan 2012 18:45:10 -0500
From: KOSAKI Motohiro <kosaki.motohiro@...il.com>
To: Venki Pallipadi <venki@...gle.com>
Cc: "Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Mike Travis <travis@....com>,
"Paul E. McKenney" <paul.mckenney@...aro.org>,
"Rafael J. Wysocki" <rjw@...k.pl>,
Paul Gortmaker <paul.gortmaker@...driver.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Avoid mask based num_possible_cpus and num_online_cpus
>>> +int nr_online_cpus __read_mostly;
>>> +EXPORT_SYMBOL(nr_online_cpus);
>>> +
>>> void set_cpu_possible(unsigned int cpu, bool possible)
>>> {
>>> if (possible)
>>
>>
>> Did you forget to add:
>>
>> nr_possible_cpus = cpumask_weight(cpu_possible_mask);
>>
>> inside set_cpu_possible() ?
>
> No. That was intentional as I have that coupled with nr_cpu_ids and
> set once after all the bits are set in setup_nr_cpu_ids() instead of
> doing for each bit set.
But, Srivatsa's way seems more safer, no? Is there any advantage to make couple
with nr_cpu_ids?
--
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