All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <aarcange@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Izik Eidus <ieidus@redhat.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	linux-mm@kvack.org, avi@redhat.com, chrisw@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 4/4] add ksm kernel shared memory driver.
Date: Tue, 31 Mar 2009 18:25:25 +0200	[thread overview]
Message-ID: <20090331162525.GU9137@random.random> (raw)
In-Reply-To: <49D23CD1.9090208@codemonkey.ws>

On Tue, Mar 31, 2009 at 10:54:57AM -0500, Anthony Liguori wrote:
> You can still disable ksm and simply return ENOSYS for the MADV_ flag.  You 

-EINVAL if something, -ENOSYS would tell userland that it shall stop
trying to use madvise, including the other MADV_ too.

> could even keep it as a module if you liked by separating the madvise bits 
> from the ksm bits.  The madvise() bits could just provide the tracking 
> infrastructure for determine which vmas were currently marked as sharable.
> You could then have ksm as loadable module that consumed that interface to 
> then perform scanning.

What's the point of making ksm a module if one has part of ksm code
loaded in the kernel and not being possible to avoid compiling in?
People that says KSM=N in their .config (like embedded running with 1M
of ram), don't want that tracking overhead compiled into the kernel.

Returning -EINVAL would be an option but again I think madvise is core
syscall for SuS and I don't like that those core VM parts returns
-EINVAL at will depend on certain kernel modules being loaded.

> A number of MADV_ flags are Linux specific (like 
> MADV_DOFORK/MADV_DONTFORK).

But those aren't kernel module related, so they're in line with the
standard ones and could be adapted by other OS.

KSM is not a core VM functionality, madvise is a core VM
functionality, so I don't see fit. KSM as ioctl or KSM creating
/proc/<pid>/ksm when loaded, sounds fine to me instead. If open of
either one fails, application won't register in. It's up to you to
choose KSM=M/N, if you want it as core functionality just build as
KSM=Y but leave the option to others to save memory.

WARNING: multiple messages have this Message-ID (diff)
From: Andrea Arcangeli <aarcange@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Izik Eidus <ieidus@redhat.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	linux-mm@kvack.org, avi@redhat.com, chrisw@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 4/4] add ksm kernel shared memory driver.
Date: Tue, 31 Mar 2009 18:25:25 +0200	[thread overview]
Message-ID: <20090331162525.GU9137@random.random> (raw)
In-Reply-To: <49D23CD1.9090208@codemonkey.ws>

On Tue, Mar 31, 2009 at 10:54:57AM -0500, Anthony Liguori wrote:
> You can still disable ksm and simply return ENOSYS for the MADV_ flag.  You 

-EINVAL if something, -ENOSYS would tell userland that it shall stop
trying to use madvise, including the other MADV_ too.

> could even keep it as a module if you liked by separating the madvise bits 
> from the ksm bits.  The madvise() bits could just provide the tracking 
> infrastructure for determine which vmas were currently marked as sharable.
> You could then have ksm as loadable module that consumed that interface to 
> then perform scanning.

What's the point of making ksm a module if one has part of ksm code
loaded in the kernel and not being possible to avoid compiling in?
People that says KSM=N in their .config (like embedded running with 1M
of ram), don't want that tracking overhead compiled into the kernel.

Returning -EINVAL would be an option but again I think madvise is core
syscall for SuS and I don't like that those core VM parts returns
-EINVAL at will depend on certain kernel modules being loaded.

> A number of MADV_ flags are Linux specific (like 
> MADV_DOFORK/MADV_DONTFORK).

But those aren't kernel module related, so they're in line with the
standard ones and could be adapted by other OS.

KSM is not a core VM functionality, madvise is a core VM
functionality, so I don't see fit. KSM as ioctl or KSM creating
/proc/<pid>/ksm when loaded, sounds fine to me instead. If open of
either one fails, application won't register in. It's up to you to
choose KSM=M/N, if you want it as core functionality just build as
KSM=Y but leave the option to others to save memory.

--
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:[~2009-03-31 16:26 UTC|newest]

Thread overview: 135+ 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 ` Izik Eidus
2009-03-30 23:59 ` [PATCH 1/4] MMU_NOTIFIERS: add set_pte_at_notify() Izik Eidus
2009-03-30 23:59   ` Izik Eidus
2009-03-30 23:59   ` [PATCH 2/4] add page_wrprotect(): write protecting page Izik Eidus
2009-03-30 23:59     ` 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       ` Izik Eidus
2009-03-30 23:59       ` [PATCH 4/4] add ksm kernel shared memory driver Izik Eidus
2009-03-30 23:59         ` Izik Eidus
2009-03-31  2:12         ` Anthony Liguori
2009-03-31  2:12           ` Anthony Liguori
2009-03-31 12:24           ` Izik Eidus
2009-03-31 12:24             ` Izik Eidus
2009-03-31 13:31             ` Anthony Liguori
2009-03-31 13:31               ` Anthony Liguori
2009-03-31 14:25               ` Andrea Arcangeli
2009-03-31 14:25                 ` Andrea Arcangeli
2009-03-31 14:37                 ` Anthony Liguori
2009-03-31 14:37                   ` Anthony Liguori
2009-03-31 15:02                   ` Andrea Arcangeli
2009-03-31 15:02                     ` Andrea Arcangeli
2009-03-31 15:09                     ` Anthony Liguori
2009-03-31 15:09                       ` Anthony Liguori
2009-03-31 15:18                       ` Andrea Arcangeli
2009-03-31 15:18                         ` Andrea Arcangeli
2009-03-31 15:54                         ` Anthony Liguori
2009-03-31 15:54                           ` Anthony Liguori
2009-03-31 16:25                           ` Andrea Arcangeli [this message]
2009-03-31 16:25                             ` Andrea Arcangeli
2009-03-31 16:51                             ` Anthony Liguori
2009-03-31 16:51                               ` Anthony Liguori
2009-03-31 17:11                               ` Andrea Arcangeli
2009-03-31 17:11                                 ` Andrea Arcangeli
2009-04-01 22:54                               ` Izik Eidus
2009-04-01 22:54                                 ` Izik Eidus
2009-04-02  0:31                                 ` Anthony Liguori
2009-04-02  0:31                                   ` Anthony Liguori
2009-04-02  0:48                                   ` Chris Wright
2009-04-02  0:48                                     ` Chris Wright
2009-04-02  1:22                               ` Chris Wright
2009-04-02  1:22                                 ` Chris Wright
2009-04-02  2:36                                 ` Anthony Liguori
2009-04-02  2:36                                   ` Anthony Liguori
2009-04-02  5:31                                   ` [PATCH 5/4] update ksm userspace interfaces Chris Wright
2009-04-02  5:31                                     ` Chris Wright
2009-04-02 13:32                                     ` Izik Eidus
2009-04-02 13:32                                       ` Izik Eidus
2009-04-02 15:20                                       ` Chris Wright
2009-04-02 15:20                                         ` Chris Wright
2009-04-02 15:56                                       ` Chris Wright
2009-04-02 15:56                                         ` Chris Wright
2009-04-02 15:55                                         ` Izik Eidus
2009-04-02 15:55                                           ` Izik Eidus
2009-04-03 10:16                                       ` Gerd Hoffmann
2009-04-03 10:16                                         ` Gerd Hoffmann
2009-04-03 10:49                                         ` Izik Eidus
2009-04-03 10:49                                           ` Izik Eidus
2009-04-03 11:08                                           ` Gerd Hoffmann
2009-04-03 11:08                                             ` Gerd Hoffmann
2009-04-03 16:22                                             ` Chris Wright
2009-04-03 16:22                                               ` Chris Wright
2009-04-02 14:41                                     ` Andrea Arcangeli
2009-04-02 14:41                                       ` Andrea Arcangeli
2009-04-02 15:12                                       ` Chris Wright
2009-04-02 15:12                                         ` Chris Wright
2009-04-02 15:25                                         ` Andrea Arcangeli
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:48                                     ` Chris Wright
2009-04-02  5:57                                     ` Bert Wesarg
2009-04-02  5:57                                       ` Bert Wesarg
2009-04-02  5:57                                       ` Bert Wesarg
2009-04-02  5:59                                       ` Chris Wright
2009-04-02  5:59                                         ` Chris Wright
2009-04-02  6:00                                         ` Bert Wesarg
2009-04-02  6:00                                           ` Bert Wesarg
2009-04-02  7:09                                         ` Avi Kivity
2009-04-02  7:09                                           ` Avi Kivity
2009-04-02  7:24                                   ` [PATCH 4/4] " Avi Kivity
2009-04-02  7:24                                     ` Avi Kivity
2009-04-02  9:38                                   ` Andrea Arcangeli
2009-04-02  9:38                                     ` Andrea Arcangeli
2009-04-02 11:23                                   ` Izik Eidus
2009-04-02 11:23                                     ` Izik Eidus
2009-03-31  2:15         ` KAMEZAWA Hiroyuki
2009-03-31  2:15           ` KAMEZAWA Hiroyuki
2009-03-31 12:21           ` Izik Eidus
2009-03-31 12:21             ` Izik Eidus
2009-03-31 23:57             ` KAMEZAWA Hiroyuki
2009-03-31 23:57               ` KAMEZAWA Hiroyuki
2009-04-01 17:28               ` Izik Eidus
2009-04-01 17:28                 ` Izik Eidus
2009-03-31 20:52         ` Andrea Arcangeli
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  1:42   ` Anthony Liguori
2009-03-31 12:33   ` Izik Eidus
2009-03-31 12:33     ` Izik Eidus
2009-04-02 19:22 ` Jesper Juhl
2009-04-02 19:22   ` Jesper Juhl
2009-04-02 19:38   ` Izik Eidus
2009-04-02 19:38     ` Izik Eidus
2009-04-02 19:39   ` Chris Wright
2009-04-02 19:39     ` Chris Wright
2009-04-02 19:49     ` Jesper Juhl
2009-04-02 19:49       ` Jesper Juhl
  -- strict thread matches above, loose matches on Subject: below --
2009-04-04 14:35 [PATCH 0/4] ksm - dynamic page sharing driver for linux v2 Izik Eidus
2009-04-04 14:35 ` [PATCH 1/4] MMU_NOTIFIERS: add set_pte_at_notify() Izik Eidus
2009-04-04 14:35   ` [PATCH 2/4] add page_wrprotect(): write protecting page Izik Eidus
2009-04-04 14:35     ` [PATCH 3/4] add replace_page(): change the page pte is pointing to Izik Eidus
2009-04-04 14:35       ` [PATCH 4/4] add ksm kernel shared memory driver Izik Eidus
2009-04-04 14:35         ` Izik Eidus
2009-04-06  9:13         ` Andrey Panin
2009-04-06  9:13           ` Andrey Panin
2009-04-06 10:58           ` Izik Eidus
2009-04-06 10:58             ` Izik Eidus
2009-04-06 10:58             ` Izik Eidus
2009-04-09  3:58 [PATCH 0/4] ksm - dynamic page sharing driver for linux v3 Izik Eidus
2009-04-09  3:58 ` [PATCH 1/4] MMU_NOTIFIERS: add set_pte_at_notify() Izik Eidus
2009-04-09  3:58   ` [PATCH 2/4] add page_wrprotect(): write protecting page Izik Eidus
2009-04-09  3:58     ` [PATCH 3/4] add replace_page(): change the page pte is pointing to Izik Eidus
2009-04-09  3:58       ` [PATCH 4/4] add ksm kernel shared memory driver Izik Eidus
2009-04-09  3:58         ` Izik Eidus
2009-04-14 22:09         ` Andrew Morton
2009-04-14 22:09           ` Andrew Morton
2009-04-14 22:09           ` Andrew Morton
2009-04-15 22:37           ` Izik Eidus
2009-04-15 22:37             ` Izik Eidus
2009-04-15 22:50             ` Andrew Morton
2009-04-15 22:50               ` Andrew Morton
2009-04-15 23:21               ` Andrea Arcangeli
2009-04-15 23:21                 ` Andrea Arcangeli
2009-04-16  0:43           ` Jeremy Fitzhardinge
2009-04-16  0:43             ` Jeremy Fitzhardinge
2009-04-16  0:57             ` Izik Eidus
2009-04-16  0:57               ` Izik Eidus
2009-04-16 11:39             ` Andrea Arcangeli
2009-04-16 11:39               ` Andrea Arcangeli
2009-04-16 16:08               ` Jeremy Fitzhardinge
2009-04-16 16:08                 ` Jeremy Fitzhardinge
2009-04-18 14:58           ` Andrea Arcangeli
2009-04-18 14:58             ` 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=20090331162525.GU9137@random.random \
    --to=aarcange@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=chrisw@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 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.