linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
	clameter@sgi.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [QUICKLIST 0/4] Arch independent quicklists V2
Date: Tue, 13 Mar 2007 18:12:44 -0700	[thread overview]
Message-ID: <20070314011244.GM2986@holomorphy.com> (raw)
In-Reply-To: <20070313044756.b45649ac.akpm@linux-foundation.org>

On Tue, Mar 13, 2007 at 04:47:56AM -0800, Andrew Morton wrote:
> I'm trying to remember why we ever would have needed to zero out the
> pagetable pages if we're taking down the whole mm?  Maybe it's
> because "oh, the arch wants to put this page into a quicklist to
> recycle it", which is all rather circular.
> It would be interesting to look at a) leave the page full of random
> garbage if we're releasing the whole mm and b) return it straight to
> the page allocator.

We never did need to modify ptes on exit() or other pagetable prunings
(not that they were ever done outside exit() before 2.6.x). The only
subtlety is that pruning on munmap() needs a TLB flush for the TLB
itself to drop the references to the pages referred to by the PTE's on
pruning in the presence of hardware pagetable walkers (in the exit()
case there are no user execution contexts left to potentially utilize
the dead translations so it's less important). That's handled by
tlb_remove_page() and shouldn't need any updates across such a change.

I believe the zeroing on teardown was largely a result of idiom vs.
any particular need. Essentially using ptep_get_and_clear() to handle
the non-pruning munmap() case in a manner unified with other pagetable
teardowns. Also likely is 2.4.x legacy from when that and possibly
earlier kernels maintained arch-private quicklists for pagetables.

There are furthermore distinctions to make between fork() and execve().
fork() stomps over the entire process address space copying pagetables
en masse. After execve() a process incrementally faults in PTE's one at
a time. It should be clear that if case analyses are of interest at
all, fork() will want cache-hot pages (cache-preloaded pages?) where
such are largely wasted on incremental faults after execve(). The copy
operations in fork() should probably also be examined in the context of
shared pagetables at some point.


-- wli

  parent reply	other threads:[~2007-03-14  1:12 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-13  7:13 [QUICKLIST 0/4] Arch independent quicklists V2 Christoph Lameter
2007-03-13  7:13 ` [QUICKLIST 1/4] Generic quicklist implementation Christoph Lameter
2007-03-13  9:05   ` Paul Mundt
2007-03-15 20:51     ` Christoph Lameter
2007-03-13  7:13 ` [QUICKLIST 2/4] Quicklist support for i386 Christoph Lameter
2007-03-13  7:13 ` [QUICKLIST 3/4] Quicklist support for x86_64 Christoph Lameter
2007-03-13  7:13 ` [QUICKLIST 4/4] Quicklist support for sparc64 Christoph Lameter
2007-03-13  8:53 ` [QUICKLIST 0/4] Arch independent quicklists V2 Andrew Morton
2007-03-13  8:03   ` Nick Piggin
2007-03-13 11:52     ` Andrew Morton
2007-03-13 11:06       ` Nick Piggin
2007-03-13 12:15         ` Andrew Morton
2007-03-13 11:20           ` Christoph Lameter
2007-03-13 12:30             ` Andrew Morton
2007-03-15 20:23               ` Christoph Lameter
2007-03-13 11:30           ` Nick Piggin
2007-03-13 12:47             ` Andrew Morton
2007-03-13 12:01               ` Nick Piggin
2007-03-13 13:11                 ` Andrew Morton
2007-03-13 12:18                   ` Nick Piggin
2007-03-13 17:30                 ` Jeremy Fitzhardinge
2007-03-13 20:03                   ` Matt Mackall
2007-03-13 20:17                     ` Jeremy Fitzhardinge
2007-03-13 20:21                       ` Matt Mackall
2007-03-13 21:07                         ` David Miller
2007-03-13 21:14                           ` Matt Mackall
2007-03-13 21:36                             ` Jeremy Fitzhardinge
2007-03-13 21:46                               ` Peter Chubb
2007-03-13 21:48                             ` David Miller
2007-03-14  1:12               ` William Lee Irwin III [this message]
2007-03-15 23:12                 ` William Lee Irwin III
2007-03-13 23:58       ` Paul Mackerras
2007-03-13 11:17   ` Christoph Lameter
2007-03-13 12:27     ` Andrew Morton
2007-03-15 20:28       ` Christoph Lameter

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=20070314011244.GM2986@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@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;
as well as URLs for NNTP newsgroup(s).