From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: Bang Li <libang.li@antgroup.com>,
hughd@google.com, akpm@linux-foundation.org
Cc: david@redhat.com, ryan.roberts@arm.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/shmem: Fix input and output inconsistencies
Date: Fri, 28 Jun 2024 11:32:19 +0800 [thread overview]
Message-ID: <63aed837-21ae-4bc3-b327-ad2a005e6e4f@linux.alibaba.com> (raw)
In-Reply-To: <20240628032327.16987-1-libang.li@antgroup.com>
On 2024/6/28 11:23, Bang Li wrote:
> After the commit 19eaf44954df ("mm: thp: support allocation of
> anonymous multi-size THP"), add mTHP support for anonymous shmem.
> We can configure different policies through the multi-size THP
> sysfs interface for anonymous shmem.
>
> But when we configure the "advise" policy of
> /sys/kernel/mm/transparent_hugepage/hugepages-xxxkB/shmem_enabled,
> we cannot write the "advise", but write the "madvise", which is
> unreasonable. We should keep the output and input values consistent,
> which is more convenient for users.
>
> Fixes: 61a57f1b1da9 ("mm: shmem: add multi-size THP sysfs interface for anonymous shmem")
> Signed-off-by: Bang Li <libang.li@antgroup.com>
Good catch. Sorry for my typo. Thanks.
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
> ---
> mm/shmem.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/shmem.c b/mm/shmem.c
> index 13d139abe69a..d495c0701a83 100644
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -4983,7 +4983,7 @@ static ssize_t thpsize_shmem_enabled_store(struct kobject *kobj,
> clear_bit(order, &huge_shmem_orders_madvise);
> set_bit(order, &huge_shmem_orders_within_size);
> spin_unlock(&huge_shmem_orders_lock);
> - } else if (sysfs_streq(buf, "madvise")) {
> + } else if (sysfs_streq(buf, "advise")) {
> spin_lock(&huge_shmem_orders_lock);
> clear_bit(order, &huge_shmem_orders_always);
> clear_bit(order, &huge_shmem_orders_inherit);
prev parent reply other threads:[~2024-06-28 3:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-28 3:23 Bang Li
2024-06-28 3:32 ` Baolin Wang [this message]
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=63aed837-21ae-4bc3-b327-ad2a005e6e4f@linux.alibaba.com \
--to=baolin.wang@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=hughd@google.com \
--cc=libang.li@antgroup.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ryan.roberts@arm.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