From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org, Hugh Dickins <hugh@veritas.com>
Subject: Re: [patch] mm: reduce pagetable-freeing latencies
Date: Wed, 25 Jul 2007 20:08:13 +1000 [thread overview]
Message-ID: <1185358093.5439.325.camel@localhost.localdomain> (raw)
In-Reply-To: <20070725094605.GA9045@one.firstfloor.org>
On Wed, 2007-07-25 at 11:46 +0200, Andi Kleen wrote:
> > You could perhaps use C99 variable length arrays to avoid the stack
> > waste when not needed, however Andi once told me that generates rather
> > dubious code.
>
> It generates frame pointers, but that's not that bad. I'm not
> aware of any other bad side effects. Ok the compiler will limit
> your goto usage, but that's more a good thing.
>
> But since you always have to strictly limit the array in kernel code anyways
> you could as well just allocate the fixed limit.
Plan is fixed array or 4 or maybe 8 entries (pointers), that shouldn't
be -too- bad. The code path I'm a bit worried about is
unmap_mapping_ranges() which goes into zapping page tables from deep
within filesystems.
At worst, I can reduce the fixed array to 1 entry. That means that if
the batch can't manage to get a page to use for the page list, it will
end up doing the flush for each page :-) But that should rarely happen,
in fact, I would expect it to be able to get a page the next time around
because it just freed one...
Ben.
next prev parent reply other threads:[~2007-07-25 10:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-24 8:38 [patch] mm: reduce pagetable-freeing latencies Ingo Molnar
2007-07-24 8:54 ` Andrew Morton
2007-07-24 9:40 ` Benjamin Herrenschmidt
2007-07-24 12:13 ` Andi Kleen
2007-07-24 21:29 ` Benjamin Herrenschmidt
2007-07-25 6:44 ` Peter Zijlstra
2007-07-25 9:46 ` Andi Kleen
2007-07-25 10:08 ` Benjamin Herrenschmidt [this message]
2007-07-25 10:26 ` Andi Kleen
2007-07-25 10:46 ` Benjamin Herrenschmidt
2007-07-26 17:11 ` Hugh Dickins
2007-07-26 21:35 ` Benjamin Herrenschmidt
2007-07-28 1:36 ` Benjamin Herrenschmidt
2007-07-28 5:54 ` Hugh Dickins
2007-07-28 22:36 ` Benjamin Herrenschmidt
2007-07-24 11:22 ` Ingo Molnar
2007-07-24 9:40 ` Benjamin Herrenschmidt
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=1185358093.5439.325.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.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