lkml.org 
[lkml]   [2008]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 02/41] cpu alloc: The allocator
On Thu, 29 May 2008 22:10:25 -0700 (PDT) Christoph Lameter <clameter@sgi.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?


\
 
 \ /
  Last update: 2008-05-30 07:33    [W:0.097 / U:1.144 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site