Re: munmap extremely slow even with untouched mapping.

From: Hugh Dickins
Date: Sun Oct 30 2005 - 11:59:57 EST


On Sun, 30 Oct 2005, Nick Piggin wrote:
> Hugh Dickins wrote:
> >
> > 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.
>
> Yeah definitely.
>
> I wonder if we should go with Robin's fix (+/- my variation)
> as a temporary measure for 2.6.15?

You're right, I was too dismissive. I've now spent a day looking into
the larger rework, and it's a bigger job than I'd thought - partly the
architecture variations, partly the fast/slow paths and other "tlb" cruft,
partly the truncation case's i_mmap_lock (and danger of making no progress
whenever we drop it). I'll have to set all that aside for now.

I've taken another look at the two patches. The main reason I preferred
yours was that I misread Robin's! But yes, yours takes it a bit further,
and I think that is worthwhile.

But a built and tested version would be better. Aren't you trying to
return addr from each level (that's what I liked, and what I'll want to
do in the end)? But some levels are returning nothing, and unmap_vmas
does start +=, and the huge case leaves start unchanged, and zap_work
should be a long so it doesn't need casting almost everywhere, and...
given all that, I bet there's more!

As to whether p??_none should count for 1 where !pte_none counts for
PAGE_SIZE, well, they say a picture is worth a thousand words, and I'm
sure that's entered your calculation ;-) I'd probably make the p??_none
count for a little more. Perhaps we should get everyone involved in a
great profiling effort across the architectures to determine it.
Config option. Sys tunable. I'll shut up.

Hugh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/