lkml.org 
[lkml]   [2008]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] SLUB - define OO_ macro instead of hardcoded numbers
[Christoph Lameter - Wed, Oct 22, 2008 at 11:45:55AM -0700]
> On Wed, 22 Oct 2008, Cyrill Gorcunov wrote:
>
>> Looks really good for me (if it worth anything). But Christoph
>> doesn't OO_SHIT inspired by u16 too which means we could use
>> MAX_OBJ_PER_PAGE in form you mentoined but maybe we should define
>>
>> #define OO_SHIFT bits_in(page.objects) to point out why we use
>> 16 not 14, not 18 or whatever? How do you think?
>
>
> The choice of the bit size in page.objects is determined by the available
> bytes there. The choice of the OO_SHIFT (nice typo there) is determined
> by the use of a 32bit int that we want to cut into two halves.
>

Ah... I see. So wouldn't you mind to just mentoin page.objects in comment
like 'since page.objects is u16' instead of bits_in magic? Anyone who
will (if any) changing page structure is to grep the sources and find
this comment and will fix MAX_OBJS_PER_PAGE definition.

- Cyrill -


\
 
 \ /
  Last update: 2008-10-22 20:59    [W:0.687 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site