Re: [PATCH v2 1/2] mm: huge_memory: refactor thpsize_shmem_enabled_store() with sysfs_match_string()
From: Lorenzo Stoakes
Date: Thu May 14 2026 - 08:07:28 EST
On Thu, May 14, 2026 at 10:36:34AM +0800, Baolin Wang wrote:
> The subject line should be: "mm: shmem: xxx"
>
> On 5/13/26 5:45 PM, ranxiaokai627@xxxxxxx wrote:
> > From: Ran Xiaokai <ran.xiaokai@xxxxxxxxxx>
> >
> > Inspired by commit 82d9ff648c6c ("mm: huge_memory: refactor
> > anon_enabled_store() with set_anon_enabled_mode()"), refactor
> > thpsize_shmem_enabled_store() using sysfs_match_string().
> > This eliminates the duplicated spin_lock/unlock(), set/clear_bit(),
> > calls across all branches, reducing code duplication.
> >
> > Tested with selftests ./run_kselftest.sh -t mm:ksft_thp.sh,
> > all test cases passed.
> >
> > Signed-off-by: Ran Xiaokai <ran.xiaokai@xxxxxxxxxx>
> > ---
>
> You should document your changes under the '---' for the new version, or
> ideally, include a cover letter describing them.
Well this should have been a cover letter anyway! :)
Ran - please don't send series with >1 patch with 2/2 in-reply-to 1/2, it's a
pain to deal with.
Send a cover letter if >1 patch and have both in-reply-to the cover letter.
Cheers, Lorenzo