Messages in this thread | | | Date | Sat, 21 Feb 2009 12:23:41 +0900 | From | Tejun Heo <> | Subject | Re: [PATCH UPDATED 09/10] percpu: implement new dynamic percpu allocator |
| |
Andrew Morton wrote: >> +void *pcpu_base_addr; >> +EXPORT_SYMBOL_GPL(pcpu_base_addr); >> + >> +/* the size of kernel static area */ >> +static int pcpu_static_size; > > It would be nice to document the units of the `size' variables. Bytes? > Pages?
I almost always use size for bytes, so it isn't confusing to me.
> Or, better: s/size/bytes/g. > >> +static int pcpu_size_to_slot(int size) >> +{ >> + int highbit = fls(size); >> + return max(highbit - PCPU_SLOT_BASE_SHIFT + 2, 1); >> +} > > See, > > static int pcpu_bytes_to_slot(int bytes) > { > int highbit = fls(bytes); > return max(highbit - PCPU_SLOT_BASE_SHIFT + 2, 1); > } > > is clearer.
but, yeah, I agree. I'll post a patch to do the renaming.
Thanks.
-- tejun
| |