linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Stefan Roesch <shr@devkernel.io>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-s390@vger.kernel.org, linux-kselftest@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Rik van Riel <riel@surriel.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@suse.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Sven Schnelle <svens@linux.ibm.com>,
	Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH v1 1/3] mm/ksm: unmerge and clear VM_MERGEABLE when setting PR_SET_MEMORY_MERGE=0
Date: Fri, 21 Apr 2023 19:21:36 +0200	[thread overview]
Message-ID: <f809162e-4adc-cf9b-35f4-0f1b098ad283@redhat.com> (raw)
In-Reply-To: <d476d75d-74a8-9cad-a60e-4b5ecb149719@redhat.com>

>> I understand we want to keep the name "symmetric" with
>> ksm_enable_merge_any, but it also unmerges the ksm pages. Do we want to
>> reflect that in the function name?
> 
> ksm_disable_merge_any_umerge() is suboptimal.
> 
> As ksm_disable_merge_any() now reverts what ksm_enable_merge_any() ended
> up doing, I think it's just fine.
> 
> (it would be a different story if we'd be using "set" / "clear"
> terminology instead of "enable" / "disable").
> 
> We can describe that in the comment.
> 
>>
>> Can we add a comment for the function?
> 
> Can do for symmetry with ksm_enable_merge_any().
> 

+/**
+ * ksm_disable_merge_any - Disable merging on all compatible VMA's of the mm,
+ *                        previously enabled via ksm_enable_merge_any().
+ *
+ * Disabling merging implies unmerging any merged pages, like setting
+ * MADV_UNMERGEABLE would. If unmerging fails, the whole operation fails and
+ * merging on all compatible VMA's remains enabled.
+ *
+ * @mm: Pointer to mm
+ *
+ * Returns 0 on success, otherwise error code
+ */


-- 
Thanks,

David / dhildenb



  reply	other threads:[~2023-04-21 17:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18  5:13 [PATCH v9 0/3] mm: process/cgroup ksm support Stefan Roesch
2023-04-18  5:13 ` [PATCH v9 1/3] mm: add new api to enable ksm per process Stefan Roesch
2023-04-18  5:13 ` [PATCH v9 2/3] mm: add new KSM process and sysfs knobs Stefan Roesch
2023-04-28  9:36   ` xu xin
2023-04-28 16:27     ` Stefan Roesch
2023-04-18  5:13 ` [PATCH v9 3/3] selftests/mm: add new selftests for KSM Stefan Roesch
2023-04-18 15:28 ` [PATCH v1 0/3] mm/ksm: improve PR_SET_MEMORY_MERGE=0 handling and cleanup disabling KSM David Hildenbrand
2023-04-18 15:28   ` [PATCH v1 1/3] mm/ksm: unmerge and clear VM_MERGEABLE when setting PR_SET_MEMORY_MERGE=0 David Hildenbrand
2023-04-20 21:21     ` Stefan Roesch
2023-04-21 17:11       ` David Hildenbrand
2023-04-21 17:21         ` David Hildenbrand [this message]
2023-04-21 18:28           ` Stefan Roesch
2023-04-18 15:28   ` [PATCH v1 2/3] selftests/ksm: ksm_functional_tests: add prctl unmerge test David Hildenbrand
2023-04-20 21:30     ` Stefan Roesch
2023-04-18 15:28   ` [PATCH v1 3/3] mm/ksm: move disabling KSM from s390/gmap code to KSM code David Hildenbrand
2023-04-19 11:39     ` Janosch Frank
2023-04-19 11:40       ` David Hildenbrand
2023-04-20 21:41     ` Stefan Roesch
2023-04-21 16:52       ` David Hildenbrand
2023-04-21 18:27         ` 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=f809162e-4adc-cf9b-35f4-0f1b098ad283@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=borntraeger@linux.ibm.com \
    --cc=frankja@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hannes@cmpxchg.org \
    --cc=hca@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=riel@surriel.com \
    --cc=shr@devkernel.io \
    --cc=shuah@kernel.org \
    --cc=svens@linux.ibm.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