Linux-mm Archive on
 help / color / Atom feed
From: Michal Hocko <>
To: Oleksandr Natalenko <>
Cc:, Kirill Tkhai <>,
	Vlastimil Babka <>,
	Matthew Wilcox <>,
	Pavel Tatashin <>,
	Timofey Titovets <>,
	Aaron Tomlin <>,
	Grzegorz Halat <>,,,
	Hugh Dickins <>,
	Suren Baghdasaryan <>,
	Minchan Kim <>
Subject: Re: [PATCH RFC v2 0/4] mm/ksm: add option to automerge VMAs
Date: Wed, 15 May 2019 16:51:51 +0200
Message-ID: <> (raw)
In-Reply-To: <>

[Cc Suren and Minchan - the email thread starts here]

On Wed 15-05-19 08:53:11, Michal Hocko wrote:
> I will try to comment on the interface itself later. But I have to say
> that I am not impressed. Abusing sysfs for per process features is quite
> gross to be honest.

I have already commented on this in other email. I consider sysfs an
unsuitable interface for per-process API. Not to mention this particular
one is very KSM specific while the question about setting different
hints on memory of a remote process is a more generic question. As
already mentioned there are usecases where people would like to say
that a certain memory is cold from outside of the process context (e.g.
monitor application). So essentially a form of a user space memory
management. And this usecase sounds a bit similar to me and having a
common api sounds more sensible to me.

One thing we were discussing at LSFMM this year was a way to either
provide madvise_remote(pid, addr, length, advice) or a fadvise
alternative over /proc/<pid>/map_vmas/<range> file descriptors
(essentially resembling the existing map_files api) to achieve such a
functionality. This is still a very rough idea but the api would sound
much more generic to me and it would allow much wider range of usecases.

But maybe I am completely wrong and this is just opens a can of worms
that we do not want.
Michal Hocko

  parent reply index

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-14 13:16 Oleksandr Natalenko
2019-05-14 13:16 ` [PATCH RFC v2 1/4] mm/ksm: introduce ksm_enter() helper Oleksandr Natalenko
2019-05-14 13:16 ` [PATCH RFC v2 2/4] mm/ksm: introduce ksm_leave() helper Oleksandr Natalenko
2019-05-14 13:16 ` [PATCH RFC v2 3/4] mm/ksm: introduce force_madvise knob Oleksandr Natalenko
2019-05-14 13:22   ` Aaron Tomlin
2019-05-15  0:48     ` Timofey Titovets
2019-05-14 13:16 ` [PATCH RFC v2 4/4] mm/ksm: add force merging/unmerging documentation Oleksandr Natalenko
2019-05-15  0:53   ` Timofey Titovets
2019-05-15  6:26     ` Oleksandr Natalenko
2019-05-14 14:41 ` [PATCH RFC v2 0/4] mm/ksm: add option to automerge VMAs Michal Hocko
2019-05-14 14:51   ` Michal Hocko
2019-05-15  6:25     ` Oleksandr Natalenko
2019-05-15  6:53       ` Michal Hocko
2019-05-15  7:37         ` Oleksandr Natalenko
2019-05-15  8:33           ` Michal Hocko
2019-05-15  8:51             ` Oleksandr Natalenko
2019-05-15 14:24               ` Michal Hocko
2019-05-15 14:51         ` Michal Hocko [this message]
2019-05-15 15:15           ` Greg KH
2019-05-16  7:47             ` Michal Hocko
2019-05-16  7:53               ` Greg KH

Reply instructions:

You may reply publically 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-mm Archive on

Archives are clonable:
	git clone --mirror linux-mm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mm linux-mm/ \
	public-inbox-index linux-mm

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone