kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@redhat.com>
To: Andrea Arcangeli <aarcange@redhat.com>
Cc: Chris Wright <chrisw@redhat.com>,
	Anthony Liguori <anthony@codemonkey.ws>,
	Izik Eidus <ieidus@redhat.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	linux-mm@kvack.org, avi@redhat.com, riel@redhat.com,
	jeremy@goop.org, mtosatti@redhat.com, hugh@veritas.com,
	corbet@lwn.net, yaniv@redhat.com, dmonakhov@openvz.org
Subject: Re: [PATCH 5/4] update ksm userspace interfaces
Date: Thu, 2 Apr 2009 08:12:51 -0700	[thread overview]
Message-ID: <20090402151251.GA10392@x200.localdomain> (raw)
In-Reply-To: <20090402144118.GH9137@random.random>

* Andrea Arcangeli (aarcange@redhat.com) wrote:
> On Wed, Apr 01, 2009 at 10:31:14PM -0700, Chris Wright wrote:
> >   - register only ATM, can add MADV_UNSHAREABLE to allow an app to proactively
> >     unregister, but need a cleanup when ->mm goes away via exit/exec
> 
> The unregister cleanup must happen at the vma level (with unregister
> when vma goes away or is overwritten) for this to provide sane madvise
> semantics (not just in exit/exec, but in unmap/mmap too). Otherwise
> this is all but madvise. Basically we need a chunk of code in core VM
> when KSM=y/m, even if we keep returning -EINVAL when KSM=n (for
> backwards compatibility, -ENOSYS not). Example, vma must be split in
> two if you MAP_SHARABLE only part of it etc...

Yes, of course.  I mentioned that (push whole thing into vma).
Current api is really at ->mm level, it's vma agnostic.  Simply put:
watch for pages in this ->mm between start and start+len and (more or
less regardless of the vma).  To do it purely at the vma level would
mean a vma unmap would cause the watch to go away.  So, question is...do
we need something in ->mm as well (like mlockall)?

  reply	other threads:[~2009-04-02 15:12 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-30 23:59 [PATCH 0/4] ksm - dynamic page sharing driver for linux Izik Eidus
2009-03-30 23:59 ` [PATCH 1/4] MMU_NOTIFIERS: add set_pte_at_notify() Izik Eidus
2009-03-30 23:59   ` [PATCH 2/4] add page_wrprotect(): write protecting page Izik Eidus
2009-03-30 23:59     ` [PATCH 3/4] add replace_page(): change the page pte is pointing to Izik Eidus
2009-03-30 23:59       ` [PATCH 4/4] add ksm kernel shared memory driver Izik Eidus
2009-03-31  2:12         ` Anthony Liguori
2009-03-31 12:24           ` Izik Eidus
2009-03-31 13:31             ` Anthony Liguori
2009-03-31 14:25               ` Andrea Arcangeli
2009-03-31 14:37                 ` Anthony Liguori
2009-03-31 15:02                   ` Andrea Arcangeli
2009-03-31 15:09                     ` Anthony Liguori
2009-03-31 15:18                       ` Andrea Arcangeli
2009-03-31 15:54                         ` Anthony Liguori
2009-03-31 16:25                           ` Andrea Arcangeli
2009-03-31 16:51                             ` Anthony Liguori
2009-03-31 17:11                               ` Andrea Arcangeli
2009-04-01 22:54                               ` Izik Eidus
2009-04-02  0:31                                 ` Anthony Liguori
2009-04-02  0:48                                   ` Chris Wright
2009-04-02  1:22                               ` Chris Wright
2009-04-02  2:36                                 ` Anthony Liguori
2009-04-02  5:31                                   ` [PATCH 5/4] update ksm userspace interfaces Chris Wright
2009-04-02 13:32                                     ` Izik Eidus
2009-04-02 15:20                                       ` Chris Wright
2009-04-02 15:56                                       ` Chris Wright
2009-04-02 15:55                                         ` Izik Eidus
2009-04-03 10:16                                       ` Gerd Hoffmann
2009-04-03 10:49                                         ` Izik Eidus
2009-04-03 11:08                                           ` Gerd Hoffmann
2009-04-03 16:22                                             ` Chris Wright
2009-04-02 14:41                                     ` Andrea Arcangeli
2009-04-02 15:12                                       ` Chris Wright [this message]
2009-04-02 15:25                                         ` Andrea Arcangeli
2009-04-02  5:48                                   ` [PATCH 4/4 alternative userspace] add ksm kernel shared memory driver Chris Wright
2009-04-02  5:57                                     ` Bert Wesarg
2009-04-02  5:59                                       ` Chris Wright
2009-04-02  6:00                                         ` Bert Wesarg
2009-04-02  7:09                                         ` Avi Kivity
2009-04-02  7:24                                   ` [PATCH 4/4] " Avi Kivity
2009-04-02  9:38                                   ` Andrea Arcangeli
2009-04-02 11:23                                   ` Izik Eidus
2009-03-31  2:15         ` KAMEZAWA Hiroyuki
2009-03-31 12:21           ` Izik Eidus
2009-03-31 23:57             ` KAMEZAWA Hiroyuki
2009-04-01 17:28               ` Izik Eidus
2009-03-31 20:52         ` Andrea Arcangeli
2009-03-31  1:42 ` [PATCH 0/4] ksm - dynamic page sharing driver for linux Anthony Liguori
2009-03-31 12:33   ` Izik Eidus
2009-04-02 19:22 ` Jesper Juhl
2009-04-02 19:38   ` Izik Eidus
2009-04-02 19:39   ` Chris Wright
2009-04-02 19:49     ` Jesper Juhl

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=20090402151251.GA10392@x200.localdomain \
    --to=chrisw@redhat.com \
    --cc=aarcange@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=corbet@lwn.net \
    --cc=dmonakhov@openvz.org \
    --cc=hugh@veritas.com \
    --cc=ieidus@redhat.com \
    --cc=jeremy@goop.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mtosatti@redhat.com \
    --cc=riel@redhat.com \
    --cc=yaniv@redhat.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;
as well as URLs for NNTP newsgroup(s).