linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Stefan Roesch <shr@devkernel.io>
Cc: kernel-team@fb.com, david@redhat.com, hannes@cmpxchg.org,
	riel@surriel.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [PATCH v3 0/2] mm/ksm: add fork-exec support for prctl
Date: Thu, 21 Sep 2023 17:32:51 -0700	[thread overview]
Message-ID: <20230921173251.54b854fb0ec7af2bf3e3ec3b@linux-foundation.org> (raw)
In-Reply-To: <20230921164709.3627565-1-shr@devkernel.io>

On Thu, 21 Sep 2023 09:47:07 -0700 Stefan Roesch <shr@devkernel.io> wrote:

> A process can enable KSM with the prctl system call. When the process is
> forked the KSM flag is inherited by the child process.

I guess that's logical, as it's still the same program.

> However if the
> process is executing an exec system call directly after the fork, the
> KSM setting is cleared. This patch series addresses this problem.

Well...  who said it's a problem?  There's nothing in our documentation
about this(?).  Why is the current behavior wrong?  If the new program
wants KSM, it can turn on KSM.

This significant change in user-visible behavior deserves much more
explanation and justification, please.  Including an explanation of why
it's OK to change kernel behavior under existing users' feet like this,



  parent reply	other threads:[~2023-09-22  0:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-21 16:47 Stefan Roesch
2023-09-21 16:47 ` [PATCH v3 1/2] mm/ksm: support fork/exec " Stefan Roesch
2023-09-21 16:47 ` [PATCH v3 2/2] mm/ksm: Test case for prctl fork/exec workflow Stefan Roesch
2023-09-22  0:32 ` Andrew Morton [this message]
2023-09-22 16:08   ` [PATCH v3 0/2] mm/ksm: add fork-exec support for prctl Stefan Roesch

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=20230921173251.54b854fb0ec7af2bf3e3ec3b@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=hannes@cmpxchg.org \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=riel@surriel.com \
    --cc=shr@devkernel.io \
    /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