lkml.org 
[lkml]   [2005]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 2/2 Prezeroing large blocks of pages during allocation Version 4
On Tue, 8 Mar 2005, KAMEZAWA Hiroyuki wrote:

> Hi,
>
> Mel Gorman wrote:
>
> > +#define BITS_PER_ALLOC_TYPE 5
> > #define ALLOC_KERNNORCLM 0
> > #define ALLOC_KERNRCLM 1
> > #define ALLOC_USERRCLM 2
> > #define ALLOC_FALLBACK 3
> > +#define ALLOC_USERZERO 4
> > +#define ALLOC_KERNZERO 5
> >
>
> Now, 5bits per MAX_ORDER pages.
> I think it is simpler to use "char[]" for representing type of memory alloc
> type than bitmap.
>

Possibly, but it would also use up that bit more space. That map could be
condensed to 3 bits but would make it that bit (no pun) more complex and
difficult to merge. On the other hand, it would be faster to use a char[]
as it would be an array-index lookup to get a pageblock type rather than a
number of bit operations.

So, it depends on what people know to be better in general because I have
not measured it to know for a fact. Is it better to use char[] and use
array indexes rather than bit operations or is it better to leave it as a
bitmap and condense it later when things have settled down?

--
Mel Gorman
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.114 / U:1.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site