All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Andy Lutomirski <luto@kernel.org>,
	Hugh Dickins <hughd@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: do not let vdso pages into LRU rotation
Date: Thu, 28 Jan 2016 16:33:02 -0500	[thread overview]
Message-ID: <20160128213302.GB4163@cmpxchg.org> (raw)
In-Reply-To: <CALCETrVy_QzNyaCiOsdwDdgXAgdRmwXsdiyPz8R5h3xaNR00TQ@mail.gmail.com>

On Wed, Jan 27, 2016 at 12:32:16PM -0800, Andy Lutomirski wrote:
> On Wed, Jan 27, 2016 at 11:39 AM, Johannes Weiner <hannes@cmpxchg.org> wrote:
> > Could the VDSO be a VM_MIXEDMAP to keep the initial unmanaged pages
> > out of the VM while allowing COW into regular anonymous pages?
> 
> Probably.  What are its limitations?  We want ptrace to work on it,
> and mprotect needs to work and allow COW.  access_process_vm should
> probably work, too.

Thanks, that's good to know.

However, after looking at this a little longer, it appears this would
need work in do_wp_page() to support non-page COW copying, then adding
vm_ops->access and complicating ->fault in all VDSO implementations.

And it looks like - at least theoretically - drivers can inject non-VM
pages into the page tables as well (comment above insert_page())

Given that this behavior has been around for a long time (the comment
at the bottom of vm_normal_page is ancient), I'll probably go with a
more conservative approach; add a comment to mark_page_accessed() and
filter out non-VM pages in the function I'm going to call from it.

Thanks!

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

WARNING: multiple messages have this Message-ID (diff)
From: Johannes Weiner <hannes@cmpxchg.org>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Andy Lutomirski <luto@kernel.org>,
	Hugh Dickins <hughd@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: do not let vdso pages into LRU rotation
Date: Thu, 28 Jan 2016 16:33:02 -0500	[thread overview]
Message-ID: <20160128213302.GB4163@cmpxchg.org> (raw)
In-Reply-To: <CALCETrVy_QzNyaCiOsdwDdgXAgdRmwXsdiyPz8R5h3xaNR00TQ@mail.gmail.com>

On Wed, Jan 27, 2016 at 12:32:16PM -0800, Andy Lutomirski wrote:
> On Wed, Jan 27, 2016 at 11:39 AM, Johannes Weiner <hannes@cmpxchg.org> wrote:
> > Could the VDSO be a VM_MIXEDMAP to keep the initial unmanaged pages
> > out of the VM while allowing COW into regular anonymous pages?
> 
> Probably.  What are its limitations?  We want ptrace to work on it,
> and mprotect needs to work and allow COW.  access_process_vm should
> probably work, too.

Thanks, that's good to know.

However, after looking at this a little longer, it appears this would
need work in do_wp_page() to support non-page COW copying, then adding
vm_ops->access and complicating ->fault in all VDSO implementations.

And it looks like - at least theoretically - drivers can inject non-VM
pages into the page tables as well (comment above insert_page())

Given that this behavior has been around for a long time (the comment
at the bottom of vm_normal_page is ancient), I'll probably go with a
more conservative approach; add a comment to mark_page_accessed() and
filter out non-VM pages in the function I'm going to call from it.

Thanks!

  reply	other threads:[~2016-01-28 21:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27 19:39 [PATCH] mm: do not let vdso pages into LRU rotation Johannes Weiner
2016-01-27 19:39 ` Johannes Weiner
2016-01-27 20:32 ` Andy Lutomirski
2016-01-27 20:32   ` Andy Lutomirski
2016-01-28 21:33   ` Johannes Weiner [this message]
2016-01-28 21:33     ` Johannes Weiner
2016-01-29 22:21     ` Andy Lutomirski
2016-01-29 22:21       ` Andy Lutomirski

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=20160128213302.GB4163@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@amacapital.net \
    --cc=luto@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.