Re: [patch 02/41] cpu alloc: The allocator

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

 



On Thu, 29 May 2008 22:10:25 -0700 (PDT) Christoph Lameter <clameter@xxxxxxx> 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-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux