From: Andrew Morton <akpm@digeo.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: "Martin J. Bligh" <mbligh@aracnet.com>,
Dave McCracken <dmccr@us.ibm.com>,
Daniel Phillips <phillips@arcor.de>,
linux-mm@kvack.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: shared pagetable benchmarking
Date: Fri, 27 Dec 2002 22:58:11 -0800 [thread overview]
Message-ID: <3E0D4B83.FEE220B8@digeo.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0212271846100.2759-100000@home.transmeta.com>
Linus Torvalds wrote:
>
> On Fri, 27 Dec 2002, Andrew Morton wrote:
> >
> > I think we can do a few things still in the 2.6 context. The fact that
> > my "apply seventy patches with patch-scripts" test takes 350,000 pagefaults
> > in 13 seconds makes one go "hmm".
>
> Hmm.. Whatever happened to the MAP_POPULATE tests?
>
> The current "filemap_populate()" function is extremely stupid (it takes
> advantage neither of the locality of the page tables _nor_ of the radix
> tree layout), but even so it would probably be a win to pre-populate at
> mmap time.
Yup. Ingo said at the time:
It would be faster to iterate the pagecache mapping's radix tree
and the pagetables at once, but it's also *much* more complex. I have
tried to implement it and had to unroll the change - mixing radix tree
walking and pagetable walking and getting all the VM details right is
really complex - especially considering all the re-lookup race checks
that have to occur upon IO.
But find_get_pages() is well-suited to this, and was not in place when
he did this work.
> But having a better "populate()" function that actually does multiple
> pages at once by just accessing the radix trees and page table trees
> directly should really be very low-overhead for the normal case, and be a
> _big_ win in avoiding page faults.
>
> Even with the existing stupid populate function, it might be interesting
> seeing what would happen just from doing something silly like
>
> ===== arch/i386/kernel/sys_i386.c 1.10 vs edited =====
> --- 1.10/arch/i386/kernel/sys_i386.c Sat Dec 21 08:24:45 2002
> +++ edited/arch/i386/kernel/sys_i386.c Fri Dec 27 19:08:30 2002
> @@ -54,6 +54,8 @@
> file = fget(fd);
> if (!file)
> goto out;
> + if (prot & PROT_EXEC)
> + flags |= MAP_POPULATE | MAP_NONBLOCK;
Yes, this could be used to prototype it, I think.
It doesn't work as-is, because remap_file_pages() requires a shared
mapping. Disabling that check results in a scrogged ld.so and a
non-booting system. remap_file_pages() plays games with the vma
protection in ways which I do not understand.
So hum. I'll finish off some other stuff, take a more detailed look
at this soon.
--
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/
next prev parent reply other threads:[~2002-12-28 6:58 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-20 11:11 Andrew Morton
2002-12-20 11:13 ` William Lee Irwin III
2002-12-20 16:30 ` Dave McCracken
2002-12-20 19:59 ` Andrew Morton
2002-12-23 16:15 ` Dave McCracken
2002-12-23 23:54 ` Andrew Morton
2002-12-27 9:39 ` Daniel Phillips
2002-12-27 9:58 ` Andrew Morton
2002-12-27 15:59 ` Daniel Phillips
2002-12-27 20:02 ` Linus Torvalds
2002-12-27 20:16 ` Dave McCracken
2002-12-27 20:18 ` Linus Torvalds
2002-12-27 20:45 ` Dave McCracken
2002-12-27 20:50 ` Linus Torvalds
2002-12-27 23:56 ` Daniel Phillips
2002-12-28 0:45 ` Martin J. Bligh
2002-12-28 2:34 ` Andrew Morton
2002-12-28 3:10 ` Linus Torvalds
2002-12-28 6:58 ` Andrew Morton [this message]
2002-12-28 7:39 ` Ingo Molnar
2002-12-28 7:47 ` Linus Torvalds
2002-12-28 23:28 ` Andrew Morton
2002-12-28 3:19 ` Martin J. Bligh
2002-12-23 18:19 ` Dave McCracken
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=3E0D4B83.FEE220B8@digeo.com \
--to=akpm@digeo.com \
--cc=dmccr@us.ibm.com \
--cc=linux-mm@kvack.org \
--cc=mbligh@aracnet.com \
--cc=mingo@elte.hu \
--cc=phillips@arcor.de \
--cc=torvalds@transmeta.com \
/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