linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	akpm@linux-foundation.org, mingo@elte.hu, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, benh@kernel.crashing.org
Subject: Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear)
Date: Wed, 7 Mar 2007 13:17:30 +0100	[thread overview]
Message-ID: <20070307121730.GC18704@wotan.suse.de> (raw)
In-Reply-To: <1173268086.6374.157.camel@twins>

On Wed, Mar 07, 2007 at 12:48:06PM +0100, Peter Zijlstra wrote:
> On Wed, 2007-03-07 at 12:00 +0100, Nick Piggin wrote:
> > On Wed, Mar 07, 2007 at 11:47:42AM +0100, Peter Zijlstra wrote:
> > > On Wed, 2007-03-07 at 11:38 +0100, Nick Piggin wrote:
> > > 
> > > > > > There are real users who want these fast, though.
> > > > > 
> > > > > Yeah, why don't we have a tree per nonlinear vma to find these pages?
> > > > > 
> > > > > wli mentions shadow page tables..
> > > > 
> > > > We could do something more efficient, but I thought that half the point
> > > > was that they didn't carry any of this extra memory, and they could be
> > > > really fast to set up at the expense of efficiency elsewhere.
> > > 
> > > I'm failing to understand this :-(
> > > 
> > > That extra memory, and apparently they don't want the inefficiency
> 
> s/T/W/
> 
> > > either.
> > 
> > Sorry, I didn't understand your misunderstandings ;)
> 
> Bah, my brain is thick and foggy today. Let us try again;
> 
> Nonlinear vmas exist because many vmas are expensive somehow, right?
> Nonlinear vmas keep the page mapping in the page tables and screw rmaps.
> 
> This 'extra memory' you mentioned would be the overhead of tracking the
> actual ranges?
> 
> And apparently now we want it to not suck on the rmap case :-(

Do we? I think just "work" is the way we've been handling them up until
now. Making them suck less for rmap makes them suck more for what they're
good at.

> Anyway, if used on a non writeback capable backing store (ramfs)
> page_mkclean will never be called. If also mlocked (I think oracle does
> this) then page reclaim will pass over too.
> 
> So we're only interested in the bdi_cap_accounting_dirty and VM_SHARED
> case, right?
> 
> Tracking these ranges on a per-vma basis would avoid taking the mm wide
> mmap_sem and so would be cheaper than regular vmas.
> 
> Would that still be too expensive?

Well you can today remap N pages in a file, arbitrarily for
sizeof(pte_t)*tiny bit for the upper page tables + small constant
for the vma.

At best, you need an extra pointer to pte / vaddr, so you'd basically
double memory overhead.

> > > Well, now they don't, but it could be done or even exploited as a DoS.
> > 
> > But so could nonlinear page reclaim. I think we need to restrict nonlinear
> > mappings to root if we're worried about that.
> 
> Can't we just 'fix' it?

The thing is, I don't think anybody who uses these things cares
about any of the 'problems' you want to fix, do they? We are
interested in dirty pages only for the correctness issue, rather
than performance. Same as reclaim.

--
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-03-07 12:17 UTC|newest]

Thread overview: 99+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-21  4:49 [patch 0/6] fault vs truncate/invalidate race fix Nick Piggin
2007-02-21  4:49 ` [patch 1/6] mm: debug check for the fault vs invalidate race Nick Piggin
2007-02-21  4:49 ` [patch 2/6] mm: simplify filemap_nopage Nick Piggin
2007-02-21  4:50 ` [patch 3/6] mm: fix fault vs invalidate race for linear mappings Nick Piggin
2007-03-07  6:36   ` Andrew Morton
2007-03-07  6:57     ` Nick Piggin
2007-03-07  7:08       ` Andrew Morton
2007-03-07  7:25         ` Nick Piggin
2007-02-21  4:50 ` [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear) Nick Piggin
2007-03-07  6:51   ` Andrew Morton
2007-03-07  7:08     ` Nick Piggin
2007-03-07  8:19       ` Nick Piggin
2007-03-07  8:27         ` Ingo Molnar
2007-03-07  8:35           ` Andrew Morton
2007-03-07  8:53             ` Ingo Molnar
2007-03-07  9:28               ` Nick Piggin
2007-03-07  9:44                 ` Bill Irwin
2007-03-07  9:49                   ` Nick Piggin
2007-03-07 10:02                     ` Nick Piggin
2007-03-12 23:01                       ` Blaisorblade
2007-03-13  1:19                         ` Nick Piggin
2007-03-17 12:17                           ` Blaisorblade
2007-03-18  2:50                             ` Nick Piggin
2007-03-18 13:09                               ` Jeff Dike
2007-03-19 12:04                               ` Bill Irwin
2007-03-19 20:44                               ` Blaisorblade
2007-03-20  6:00                                 ` Nick Piggin
2007-03-21 19:45                                   ` Blaisorblade
2007-03-08 12:39                   ` Blaisorblade
2007-03-07  9:29             ` Bill Irwin
2007-03-07  9:39               ` Andrew Morton
2007-03-07 10:09                 ` Bill Irwin
2007-03-07  8:38           ` Miklos Szeredi
2007-03-07  8:47             ` Andrew Morton
2007-03-07  8:51               ` Miklos Szeredi
2007-03-07  9:07                 ` Andrew Morton
2007-03-07  9:18                   ` Nick Piggin
2007-03-07  9:26                     ` Andrew Morton
2007-03-07  9:28                       ` Miklos Szeredi
2007-03-07  9:38                       ` Nick Piggin
2007-03-07  9:25                   ` Miklos Szeredi
2007-03-07  9:32                   ` Peter Zijlstra
2007-03-07  9:45                     ` Nick Piggin
2007-03-07 10:04                       ` Nick Piggin
2007-03-07 10:06                         ` Peter Zijlstra
2007-03-07 10:13                           ` Miklos Szeredi
2007-03-07 10:21                             ` Nick Piggin
2007-03-07 10:24                               ` Peter Zijlstra
2007-03-07 10:38                                 ` Nick Piggin
2007-03-07 10:47                                   ` Peter Zijlstra
2007-03-07 11:00                                     ` Nick Piggin
2007-03-07 11:48                                       ` Peter Zijlstra
2007-03-07 12:17                                         ` Nick Piggin [this message]
2007-03-07 12:41                                           ` Peter Zijlstra
2007-03-07 13:08                                             ` Nick Piggin
2007-03-07 13:19                                               ` Peter Zijlstra
2007-03-07 13:36                                                 ` Nick Piggin
2007-03-07 13:52                                                   ` Peter Zijlstra
2007-03-07 13:56                                                     ` Miklos Szeredi
2007-03-07 14:34                                                     ` Peter Zijlstra
2007-03-07 15:01                                                       ` Nick Piggin
2007-03-07 16:58                                                         ` [RFC][PATCH] mm: fix page_mkclean() vs non-linear vmas Peter Zijlstra
2007-03-07 18:00                                                           ` Linus Torvalds
2007-03-07 18:12                                                             ` Peter Zijlstra
2007-03-07 18:24                                                               ` Peter Zijlstra
2007-03-08 11:21                                                           ` Miklos Szeredi
2007-03-08 11:37                                                             ` Peter Zijlstra
2007-03-08 11:48                                                               ` Miklos Szeredi
2007-03-08 12:11                                                                 ` Peter Zijlstra
2007-03-08 12:19                                                                   ` Nick Piggin
2007-03-08 12:25                                                                     ` Miklos Szeredi
2007-03-08 11:58                                                             ` Nick Piggin
2007-03-08 12:09                                                               ` Miklos Szeredi
2007-03-07 15:10                                                     ` [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear) Jeff Dike
2007-03-07 13:53                                                   ` Miklos Szeredi
2007-03-07 14:50                                                     ` Nick Piggin
2007-03-07 12:22                                       ` Bill Irwin
2007-03-07 12:36                                         ` Nick Piggin
2007-03-07 10:30                             ` [rfc][patch 7/6] mm: merge page_mkwrite Nick Piggin
2007-03-07  8:59           ` [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear) Nick Piggin
2007-03-07  9:11             ` Nick Piggin
2007-03-07  9:22             ` Ingo Molnar
2007-03-07  9:32               ` Bill Irwin
2007-03-07  9:35                 ` Ingo Molnar
2007-03-07  9:50                   ` Bill Irwin
2007-03-07  9:52               ` Nick Piggin
2007-03-07  7:19     ` Bill Irwin
2007-03-07 10:05     ` Benjamin Herrenschmidt
2007-03-07 10:17       ` Nick Piggin
2007-03-07 10:46         ` Benjamin Herrenschmidt
2007-02-21  4:50 ` [patch 5/6] mm: merge nopfn into fault Nick Piggin
2007-02-21  5:13   ` Nick Piggin
2007-02-21  4:50 ` [patch 6/6] mm: remove legacy cruft Nick Piggin
2007-02-27  4:36 ` [patch 0/6] fault vs truncate/invalidate race fix Dave Airlie
2007-02-27  5:32   ` Andrew Morton
2007-02-27  6:26     ` Dave Airlie
2007-02-27  6:54       ` Benjamin Herrenschmidt
2007-03-18 23:13         ` Dave Airlie
2007-02-27  8:50     ` 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=20070307121730.GC18704@wotan.suse.de \
    --to=npiggin@suse.de \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=miklos@szeredi.hu \
    --cc=mingo@elte.hu \
    /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).