From: William Lee Irwin III <wli@holomorphy.com>
To: linux-ia64@vger.kernel.org
Subject: Re: free bootmem feedback patch
Date: Wed, 14 Jul 2004 22:12:47 +0000 [thread overview]
Message-ID: <20040714221247.GU3411@holomorphy.com> (raw)
In-Reply-To: <40F46962.4090604@sgi.com>
At some point in the past, I wrote:
>> Also, it may make more sense to speed this up by freeing higher-order
>> pages at a time.
On Wed, Jul 14, 2004 at 11:34:23AM -0700, Luck, Tony wrote:
> This looks like the most promising way to put a major dent in the
> time taken. If you make sure that the bits in the bitmap line up
> correctly so that the physical addresses come out right, then you
> have an easy test for "if (v = ~0UL) {" to find larger order pages
> (5 on 32-bit systems, 6 on 64-bit). A factor 64 speedup would
> turn your 5 minute hang into a 5 second pause :-).
> Some prefetches in that loop might help too (so you don't
> have to take a full L3 cache miss on every page structure).
> Another approach might be to just free enough pages on each node
> to get all the cpus up and running, and then have one cpu on each
> node free the remaining pages for the node. But this sounds like
> major surgery (and wouldn't help my hypothetical machine that has
> huge memory on just one node).
I'd even go so far as to suggest scanning the bitmap until the
maximally sized higher-order page to free at the cursor (determined
by cursor alignment and the first bit indicating a reserved page or
otherwise MAX_ORDER bits out from the cursor) is found. More ideally
(2.7) I'd prefer to rewrite the thing altogether and explicitly track
ranges at all times, so eliminating all linear scans but the final one,
which is then very natural to arrange to free maximally sized higher-
order pages and has far fewer degenerate cases than the bitmaps.
Parallelization sounds very interesting, but something I don't have the
machine and other resources to address. I suspect as node initialization
is rearranged for the purpose of hotplugging memory this will become
easier, but have no specific ideas (or even knowledge of what's going on)
about the hotplug memory and/or bootmem parallelization topic, apart
from believing it's a good idea.
-- wli
next prev parent reply other threads:[~2004-07-14 22:12 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-13 22:59 free bootmem feedback patch Joshua Aas
2004-07-13 23:14 ` Luck, Tony
2004-07-13 23:52 ` Joshua Aas
2004-07-14 8:44 ` Andi Kleen
2004-07-14 9:17 ` William Lee Irwin III
2004-07-14 9:19 ` William Lee Irwin III
2004-07-14 16:17 ` Joshua Aas
2004-07-14 18:34 ` Luck, Tony
2004-07-14 22:12 ` William Lee Irwin III [this message]
2004-07-15 19:11 ` Luck, Tony
2004-07-15 19:31 ` Matthew Wilcox
2004-07-15 20:21 ` David Mosberger
2004-07-15 23:16 ` William Lee Irwin III
2004-07-15 23:34 ` Matthew Wilcox
2004-07-15 23:53 ` Luck, Tony
2004-07-16 0:09 ` David Mosberger
2004-07-16 0:11 ` William Lee Irwin III
2004-07-16 0:18 ` Matthew Wilcox
2004-07-16 0:18 ` William Lee Irwin III
2004-08-03 17:53 ` Josh Aas
2004-08-03 23:53 ` William Lee Irwin III
2004-08-06 14:11 ` Josh Aas
2004-08-06 14:17 ` William Lee Irwin III
2004-08-06 17:58 ` Luck, Tony
2004-08-06 18:27 ` Josh Aas
2004-08-06 20:09 ` Luck, Tony
2004-08-06 20:51 ` William Lee Irwin III
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=20040714221247.GU3411@holomorphy.com \
--to=wli@holomorphy.com \
--cc=linux-ia64@vger.kernel.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