linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: William Lee Irwin III <wli@holomorphy.com>
Cc: Matt Mackall <mpm@selenic.com>,
	Christoph Lameter <clameter@sgi.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	linux-arch@vger.kernel.org
Subject: Re: [rfc] increase struct page size?!
Date: Tue, 22 May 2007 08:24:53 +0200	[thread overview]
Message-ID: <20070522062452.GA29807@wotan.suse.de> (raw)
In-Reply-To: <20070522050410.GQ19966@holomorphy.com>

On Mon, May 21, 2007 at 10:04:10PM -0700, William Lee Irwin III wrote:
> On Mon, May 21, 2007 at 06:39:51PM -0700, William Lee Irwin III wrote:
> >> address (virtual and physical are trivially inter-convertible), mock
> >> up something akin to what filesystems do for anonymous pages, etc.
> >> The real objection everyone's going to have is that driver writers
> >> will stain their shorts when faced with the rules for handling such
> >> things. The thing is, I'm not entirely sure who these driver writers
> >> that would have such trouble are, since the driver writers I know
> >> personally are sophisticates rather than walking disaster areas as such
> >> would imply. I suppose they may not be representative of the whole.
> 
> On Tue, May 22, 2007 at 03:57:03AM +0200, Nick Piggin wrote:
> > That's not the objection I would have. I would say that firstly, I
> > don't think the mem_map overhead is very significant (at any rate,
> > an allocated-on-demand metadata is not going to be any smaller if
> > you fill up on pagecache...). Secondly, I think there is merit to
> > having the same page metadata used by the major subsystems, because
> > it helps for locality of reference.
> 
> The size isn't the advantage being cited; I'd actually expect the net
> result to be larger. It's the control over the layout of the metadata
> for cache locality and even things like having enough flags, folding
> buffer_head -like affairs into the per-page metadata for filesystems
> and so reaping cache locality benefits even there (assuming it works
> out in other respects), and so on.
> 
> Passing pages between subsystems doesn't seem very significant to me.
> There isn't going to be much locality of reference, or even any
> guarantee that the subsystem gets fed a cache hot page structure. The
> subsystem being passed the page will have its own cache hot accounting
> structures to stick the information about the memory into.

Well consider the page allocator and pagecache. The page allocator
uses page metadata rather than eg. a bitmap, and it uses page list
heads for the per-cpu allocator.

If we were to instead perhaps use external bitmaps and arrays to 
keep track of pages, then the pagecache would have to go and allocate
its own structures rather than reuse the cache hot page allocator
structures.

Buffer heads might be something that would work well, but we'd still
like to be able to deallocate them without freeing the whole pagecache
(because they tend to be associated with less frequent operations like
IO). But anyway, I don't know. I'm sure there would be cases where it
works better.


> On Tue, May 22, 2007 at 03:57:03AM +0200, Nick Piggin wrote:
> > But I haven't explored the idea enough myself to know whether there
> > would be any really killer benefits to this. Delayed metadata freeing
> > via RCU without holding up the freeing of the actual page would have
> > been something, however I can do similar with speculative references
> > now (or whenever the code gets merged), which doesn't even require the
> > RCU overhead.
> 
> I'm not entirely sure what you're on about there, but it sounds
> interesting.

Heh :) Well the lockless pagecache would become basically trivial if we
could RCU-free pagecache pages, however doing that is really awful for
a number of reasons. However if you had a system where the metadata is
decoupled, you could simply RCU-free the 'struct page' (while still
immediately freeing the page itself) which would make lockless pagecache
(and potentially similar things) equally trivial.

I assumed K42 might have been into that angle.

--
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>

  reply	other threads:[~2007-05-22  6:24 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-18  4:08 Nick Piggin
2007-05-18  4:47 ` David Miller, Nick Piggin
2007-05-18  5:12   ` Nick Piggin
2007-05-18  5:22     ` David Miller, Nick Piggin
2007-05-18  5:31       ` Nick Piggin
2007-05-18 18:15     ` Christoph Lameter
2007-05-18  7:19 ` Andrew Morton
2007-05-18  7:32   ` Nick Piggin
2007-05-18  7:43     ` Andrew Morton
2007-05-18  7:59       ` Nick Piggin
2007-05-18  9:42 ` David Howells
2007-05-19  1:30   ` Nick Piggin
2007-05-18 12:06 ` Andi Kleen
2007-05-18 15:42 ` Hugh Dickins
2007-05-19  1:22   ` Nick Piggin
2007-05-19 17:53   ` William Lee Irwin III
2007-05-20 22:50     ` Matthew Wilcox
2007-05-18 18:14 ` Christoph Lameter
2007-05-18 20:37   ` Luck, Tony
2007-05-21  6:28     ` KAMEZAWA Hiroyuki
2007-05-19  1:25   ` Nick Piggin
2007-05-19  2:03     ` [rfc] increase struct page size?! (now sparsemem vmemmap) Christoph Lameter
2007-05-19 15:43       ` Andy Whitcroft
2007-05-19 18:15     ` [rfc] increase struct page size?! William Lee Irwin III
2007-05-19 18:25       ` Christoph Lameter
2007-05-20  4:10         ` Eric Dumazet
2007-05-20 12:56           ` Andi Kleen
2007-05-21 17:08             ` Christoph Lameter
2007-05-22  0:30               ` KAMEZAWA Hiroyuki
2007-05-22  0:38                 ` Christoph Lameter
2007-05-22  0:58                   ` KAMEZAWA Hiroyuki
2007-05-22  9:44                   ` Geert Uytterhoeven
2007-05-19 22:09       ` Andrew Morton
2007-05-20  7:26         ` William Lee Irwin III
2007-05-21  9:12         ` Helge Hafting
2007-05-21  9:45           ` Nick Piggin
2007-05-20  5:22       ` Nick Piggin
2007-05-20  8:46         ` William Lee Irwin III
2007-05-20  9:25           ` Nick Piggin
2007-05-21  8:08             ` William Lee Irwin III
2007-05-21  9:27               ` Nick Piggin
2007-05-21 11:26                 ` William Lee Irwin III
2007-05-22  0:52                   ` Nick Piggin
2007-05-21 22:43                 ` Matt Mackall
2007-05-22  1:08                   ` Nick Piggin
2007-05-22  1:13                     ` Christoph Lameter
2007-05-22  1:39                   ` William Lee Irwin III
2007-05-22  1:57                     ` Nick Piggin
2007-05-22  5:04                       ` William Lee Irwin III
2007-05-22  6:24                         ` Nick Piggin [this message]
2007-05-22 10:59                           ` William Lee Irwin III
2007-05-21  9:31               ` Eric Dumazet
2007-05-21 17:06             ` Christoph Lameter
2007-05-20 17:13 ` Andrea Arcangeli

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=20070522062452.GA29807@wotan.suse.de \
    --to=npiggin@suse.de \
    --cc=clameter@sgi.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mpm@selenic.com \
    --cc=wli@holomorphy.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