[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080529223109.bbb7b0e0.akpm@linux-foundation.org>
Date: Thu, 29 May 2008 22:31:09 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Christoph Lameter <clameter@....com>
Cc: linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
David Miller <davem@...emloft.net>,
Eric Dumazet <dada1@...mosbay.com>,
Peter Zijlstra <peterz@...radead.org>,
Rusty Russell <rusty@...tcorp.com.au>,
Mike Travis <travis@....com>
Subject: Re: [patch 02/41] cpu alloc: The allocator
On Thu, 29 May 2008 22:10:25 -0700 (PDT) Christoph Lameter <clameter@....com> wrote:
> > > + start++;
> > > + first = 0;
> > > + }
> >
> > This is kinda bitmap_find_free_region(), only bitmap_find_free_region()
> > isn't quite strong enough.
> >
> > Generally I think it would have been better if you had added new
> > primitives to the bitmap library (or enhanced existing ones) and used
> > them here, rather than implementing private functionality.
>
> The scope of the patchset is already fairly large.
It would be a relatively small incremental effort ;)
> The search here is
> different and not performance critical. Not sure if this is useful for
> other purposes.
I think that strengthening bitmap_find_free_region() would end up
giving us a better kernel than open-coding something similar here.
> > > + */
> > > +
> > > +/* Return a pointer to the instance of a object for a particular processor */
> > > +#define CPU_PTR(__p, __cpu) SHIFT_PERCPU_PTR((__p), per_cpu_offset(__cpu))
> >
> > eek, a major interface function which is ALL IN CAPS!
> >
> > can we do this in lower-case? In a C function?
>
> No. This is a macro and therefore uppercase (there is macro magic going on
> that ppl need to be aware of). AFAICR you wanted it this way last year. C
> function not possible because of the type checking.
urgh. This is a C-convention versus kernel-convention thing. The C
convention exists for very good reasons. But it sure does suck.
What do others think?
--
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