From: Mel Gorman <mel@csn.ul.ie>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, clameter@sgi.com
Subject: Re: [PATCH] 2/2 Prezeroing large blocks of pages during allocation Version 4
Date: Tue, 8 Mar 2005 15:04:24 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.58.0503081458440.3227@skynet> (raw)
In-Reply-To: <422D8F2A.4010002@jp.fujitsu.com>
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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
prev parent reply other threads:[~2005-03-08 15:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-07 19:40 Mel Gorman
2005-03-08 6:14 ` KAMEZAWA Hiroyuki
2005-03-08 10:22 ` Mel Gorman
2005-03-08 11:40 ` KAMEZAWA Hiroyuki
2005-03-08 15:04 ` Mel Gorman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.58.0503081458440.3227@skynet \
--to=mel@csn.ul.ie \
--cc=clameter@sgi.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox