linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: Christoph Hellwig <hch@infradead.org>
Cc: Nick Piggin <npiggin@suse.de>,
	David Howells <dhowells@redhat.com>,
	Andrew Morton <akpm@osdl.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	gerg@uclinux.org, uclinux-dev@uclinux.org
Subject: Re: nommu use compound pages?
Date: Wed, 25 Jan 2006 15:39:43 +0100	[thread overview]
Message-ID: <20060125143943.GA25666@wotan.suse.de> (raw)
In-Reply-To: <20060125141356.GA2133@infradead.org>

On Wed, Jan 25, 2006 at 02:13:56PM +0000, Christoph Hellwig wrote:
> On Wed, Jan 25, 2006 at 10:15:09AM +0100, Nick Piggin wrote:
> > Hi,
> > 
> > This topic came up about a year ago but I couldn't work out why it never
> > happened. Possibly because compound pages wheren't always enabled.
> > 
> > Now that they are, can we have another shot? It would be great to
> > unify all this stuff finally. I must admit I'm not too familiar with
> > the nommu code, but I couldn't find a fundamental problem from the
> > archives.
> 
> I still don't know why nommu uses these at all.  Cc'in the uclinux maintainer
> and list owuld be helpfull if you'd like to find out though.

AFAIK, David has a handle on the issues, but I will take your advice.

Now that I have some more ears, I'll see if I have the issues right:

>From what I could _gather_, anonymous memory is allocated with kmalloc,
which may be backed by a higher order allocation. Refcounting is done at
the vma level. However, get_user_pages can do a 0->1 transition on the
constituent pages' refcounts and a subsequent put_page would free them.

Possibly cleaner would be to have a put_user_pages function instead
of having callers do the put_page themselves (though I haven't looked
through all callsites so this may not be possible).

nommu would then simply use their vma based refcounting entirely. The
current per-page refcounting in nommu get_user_pages looks scary/racy
against their vma refcounting anyway.

However, my main concern is to remove the hacks in the core VM made
for nommu -- I hope a simple patch like this will turn out to be
possible.

Thanks,
Nick

--
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:[~2006-01-25 14:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-25  9:15 Nick Piggin
2006-01-25 14:13 ` Christoph Hellwig
2006-01-25 14:39   ` Nick Piggin [this message]
2006-01-25 18:43   ` David Howells
2006-01-25 19:02     ` Nick Piggin

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=20060125143943.GA25666@wotan.suse.de \
    --to=npiggin@suse.de \
    --cc=akpm@osdl.org \
    --cc=dhowells@redhat.com \
    --cc=gerg@uclinux.org \
    --cc=hch@infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=uclinux-dev@uclinux.org \
    /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