Messages in this thread | ![/](/images/icornerl.gif) | | Date | Tue, 8 Mar 2005 15:04:24 +0000 (GMT) | From | Mel Gorman <> | Subject | Re: [PATCH] 2/2 Prezeroing large blocks of pages during allocation Version 4 |
| |
On Tue, 8 Mar 2005, KAMEZAWA Hiroyuki wrote:
> Mel Gorman wrote: > > > > > > > > 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? > > > Hmm, Okay, I'll wait for condensed version. > BTW, in space consumption/cache view, does using bitmap have real benefit > ? >
For space, there is a small benefit. On my system with 1.5GiB of RAM, it is about 130 bytes saved for prezeroing and about 220 with just the placement policy. For speed, I do not know how bitmaps normally perform with the CPU cache, but for the placement policy, it makes no difference. I implemented a version using char[] array and there was no performance difference that I could measure. The bitmaps just are not consulted often enough to make a big performance difference.
-- Mel Gorman Part-time Phd Student Java Applications Developer University of Limerick IBM Dublin Software Lab - 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/
| ![\](/images/icornerr.gif) |