Re: mm: Do not iterate over NR_CPUS in __zone_pcp_update()

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

 



On Tue, 9 Mar 2010, Christoph Lameter wrote:

> On Tue, 9 Mar 2010, Robert P. J. Day wrote:
>
> > > I'm having trouble working out whether we want to backport this into
> > > 2.6.33.x or earlier.  Help?
> >
> >   given the above aesthetic mod, shouldn't that same change be
> > applied to *all* explicit loops of that form?  after all,
> > checkpatch.pl warns against it:
>
> The number of NR_CPUS should be significantly less after the percpu
> rework. Would you audit the kernel for NR_CPUS use?

  i just did a simple grep for the obvious pattern:

$ grep -r "for.*NR_CPUS" *
arch/sparc/mm/init_64.c:	for (i = 0; i < NR_CPUS; i++)
arch/sparc/kernel/sun4d_smp.c:	for (i = 0; i < NR_CPUS; i++) {
arch/sparc/kernel/traps_64.c:	for (i = 0; i < NR_CPUS; i++) {
... etc etc ...

  most of the occurrences are under arch/.  as you say, after the
rework, most of those should be replaceable.

rday
--

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

            Linux Consulting, Training and Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday
========================================================================

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]