From: Hugh Dickins <hugh@veritas.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Robin Holt <holt@sgi.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: munmap extremely slow even with untouched mapping.
Date: Fri, 28 Oct 2005 16:20:40 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.61.0510281557440.3229@goblin.wat.veritas.com> (raw)
In-Reply-To: <43620138.6060707@yahoo.com.au>
On Fri, 28 Oct 2005, Nick Piggin wrote:
> Robin Holt wrote:
> >
> > I noticed that on ia64, the following simple program would take 24
> > seconds to complete. Profiling revealed I was spending all that time
> > in unmap_vmas. Looking over the function, I noticed that I would only
> > attempt 8 pages at a time (CONFIG_PREMPT). I then thought through this
> > some more. My particular application had one large mapping which was
> > never touched after being mmaped.
>
> Ouch. I wonder why nobody's noticed this before. It really is
> horribly inefficient on sparse mappings, as you've noticed :(
Yes, it's a good observation from Robin.
It'll have been spoiling the exit speedup we expected from your
2.6.14 copy_page_range "Don't copy [faultable] ptes" fork speedup.
> I guess I prefer the following (compiled, untested) slight
> variant of your patch. Measuring work in terms of address range
> is fairly vague.... however, it may be the case that some
> architectures take a long time to flush a large range of TLBs?
I prefer your patch too. But I'm not very interested in temporary
speedups relative to 2.6.14. Attacking this is a job I'd put off
until after the page fault scalability changes, which make it much
easier to do a proper job.
But I'm still mulling over precisely what that proper job is.
Probably we allocate a buffer (with fallback of course) for the
page pointers, instead of using the per-cpu mmu_gather.
The point being, the reason for ZAP_BLOCK_SIZE, and its low value
when CONFIG_PREEMPT, is that zap_pte_range is liable to build up a
head of work (TLB flushing, swap freeing, page freeing) that had to
be done with preemption still disabled. I'm aiming to do it with
with preemption enabled, and proper "do we need to break now?"
tests within zap_pte_range.
Hugh
--
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:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2005-10-28 15:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-28 1:37 Robin Holt
2005-10-28 10:45 ` Nick Piggin
2005-10-28 15:20 ` Hugh Dickins [this message]
2005-10-30 4:29 ` Nick Piggin
2005-10-30 16:58 ` Hugh Dickins
2005-10-31 9:10 ` Nick Piggin
2005-10-31 9:19 ` Nick Piggin
2005-10-31 12:20 ` Robin Holt
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.61.0510281557440.3229@goblin.wat.veritas.com \
--to=hugh@veritas.com \
--cc=holt@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nickpiggin@yahoo.com.au \
/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