linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <dhildenb@redhat.com>
To: Oscar Salvador <osalvador@suse.de>, Hui Zhu <hui.zhu@linux.dev>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Muchun Song <muchun.song@linux.dev>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Hui Zhu <zhuhui@kylinos.cn>
Subject: Re: [PATCH v4 0/2] mm/hugetlb: refactor sysfs/sysctl interfaces
Date: Wed, 5 Nov 2025 17:39:00 +0100	[thread overview]
Message-ID: <547b6ad3-fb62-4549-b1e9-8bbfb246fbd4@redhat.com> (raw)
In-Reply-To: <aQtcMkivdFHbW2lK@localhost.localdomain>

On 05.11.25 15:16, Oscar Salvador wrote:
> On Wed, Nov 05, 2025 at 10:42:42AM +0800, Hui Zhu wrote:
>> From: Hui Zhu <zhuhui@kylinos.cn>
>>
>> The hugetlb.c file has grown significantly and become difficult to
>> maintain. This patch series extracts the sysfs and sysctl interface
>> code into separate dedicated files to improve code organization.
>>
>> The refactoring includes:
>> - Patch 1: Extract sysfs interface into mm/hugetlb_sysfs.c
>> - Patch 2: Extract sysctl interface into mm/hugetlb_sysctl.c
>>
>> No functional changes are introduced in this series. The code is moved
>> as-is, with only minor formatting adjustments for code style
>> consistency. This should make future maintenance and enhancements to
>> the hugetlb subsystem easier.
>>
>> Testing: The patch series has been compile-tested and maintains the
>> same functionality as the original code.
>>
>> Changelog:
>> v4:
>> According to the comments of David Hildenbrand, add copyright of
>> hugetlb.c to hugetlb_internal.h, hugetlb_sysctl.c and hugetlb_sysfs.c.
>> v3:
>> According to the comments of SeongJae Park, updated MAINTAINERS to
>> add new files.
>> Removed the wrong copyright in hugetlb_internal.h.
>> v2:
>> According to the comments of David Hildenbrand, removed the wrong
>> copyright in the file headers.
>>
>> Hui Zhu (2):
>>    mm/hugetlb: extract sysfs into hugetlb_sysfs.c
>>    mm/hugetlb: extract sysctl into hugetlb_sysctl.c
> 
> I am replying here as a response to https://lore.kernel.org/linux-mm/58d3c50f-2b4a-4053-a846-613434d5bcd9@redhat.com/T/#mf694af3f5a6ca56b76adf66352cbb88d022fe36c
> 
> So, taking a look at patch#1 as an example,which moves sysfs stuff into hugetlb_sysfs.c.
> I have the feeling we are moving too much stuff. It is true that drawing a line
> is not easy, but e.g: you mention
> 
> The following components are moved to mm/hugetlb_sysfs.c:
> - hugetlb page demote functions (demote_free_hugetlb_folios,
>    demote_pool_huge_page)
> 
> I __think__ that moving demote_store() into hugetlb_sysfs.c is fine, but although
> demote_pool_huge_page and demote_free_hugetlb_folios are only called from there,
> they look more than a sysfs interface and more like hugetlb generic code.
> 
> Again, drawing a like might be difficult, but I think that e.g: we should only move
> sysfs entry points functions into hugetlb_sysfs.c

That matches my comments from [1], right?


[1] 
https://lore.kernel.org/linux-mm/58d3c50f-2b4a-4053-a846-613434d5bcd9@redhat.com/T/#mda7f5c2ea07233857af094367b573475011bf0d4

-- 
Cheers

David



      reply	other threads:[~2025-11-05 16:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-05  2:42 [PATCH v4 0/2] mm/hugetlb: refactor sysfs/sysctl interfaces Hui Zhu
2025-11-05  2:42 ` [PATCH v4 1/2] mm/hugetlb: extract sysfs into hugetlb_sysfs.c Hui Zhu
2025-11-05  2:42 ` [PATCH v4 2/2] mm/hugetlb: extract sysctl into hugetlb_sysctl.c Hui Zhu
2025-11-05 14:16 ` [PATCH v4 0/2] mm/hugetlb: refactor sysfs/sysctl interfaces Oscar Salvador
2025-11-05 16:39   ` David Hildenbrand [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=547b6ad3-fb62-4549-b1e9-8bbfb246fbd4@redhat.com \
    --to=dhildenb@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hui.zhu@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=muchun.song@linux.dev \
    --cc=osalvador@suse.de \
    --cc=zhuhui@kylinos.cn \
    /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;
as well as URLs for NNTP newsgroup(s).