From: Stefan Roesch <shr@devkernel.io>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: kernel-team@fb.com, linux-mm@kvack.org, riel@surriel.com,
mhocko@suse.com, david@redhat.com,
linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org,
hannes@cmpxchg.org, Bagas Sanjaya <bagasdotme@gmail.com>
Subject: Re: [PATCH v5 1/3] mm: add new api to enable ksm per process
Date: Thu, 06 Apr 2023 21:09:23 -0700 [thread overview]
Message-ID: <qvqw5ya8bacn.fsf@dev0134.prn3.facebook.com> (raw)
In-Reply-To: <20230406162957.57fa69a46691a97d4600f444@linux-foundation.org>
Andrew Morton <akpm@linux-foundation.org> writes:
> On Thu, 6 Apr 2023 09:53:37 -0700 Stefan Roesch <shr@devkernel.io> wrote:
>
>> So far KSM can only be enabled by calling madvise for memory regions. To
>> be able to use KSM for more workloads, KSM needs to have the ability to be
>> enabled / disabled at the process / cgroup level.
>>
>> ...
>>
>> @@ -53,6 +62,18 @@ void folio_migrate_ksm(struct folio *newfolio, struct folio *folio);
>>
>> #else /* !CONFIG_KSM */
>>
>> +static inline int ksm_add_mm(struct mm_struct *mm)
>> +{
>> +}
>
> The compiler doesn't like the lack of a return value.
>
> I queued up a patch to simply delete the above function - seems that
> ksm_add_mm() has no callers if CONFIG_KSM=n.
>
> The same might be true of the ksm_add_vma()...ksm_exit() stubs also,
> Perhaps some kind soul could take a look at whether we can simply clean
> those out.
ksm_add_mm() and ksm_add_vmas() is not needed.
However ksm_add_vma() is required. It is called from mm/mmap.c
next prev parent reply other threads:[~2023-04-07 4:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-06 16:53 [PATCH v5 0/3] mm: process/cgroup ksm support Stefan Roesch
2023-04-06 16:53 ` [PATCH v5 1/3] mm: add new api to enable ksm per process Stefan Roesch
2023-04-06 23:29 ` Andrew Morton
2023-04-07 4:09 ` Stefan Roesch [this message]
2023-04-11 22:35 ` Matthew Wilcox
2023-04-11 23:03 ` Stefan Roesch
2023-04-06 16:53 ` [PATCH v5 2/3] mm: add new KSM process and sysfs knobs Stefan Roesch
2023-04-11 9:10 ` David Hildenbrand
2023-04-11 22:29 ` Stefan Roesch
2023-04-06 16:53 ` [PATCH v5 3/3] selftests/mm: add new selftests for KSM 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=qvqw5ya8bacn.fsf@dev0134.prn3.facebook.com \
--to=shr@devkernel.io \
--cc=akpm@linux-foundation.org \
--cc=bagasdotme@gmail.com \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@fb.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=riel@surriel.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.