lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <547b6ad3-fb62-4549-b1e9-8bbfb246fbd4@redhat.com>
Date: Wed, 5 Nov 2025 17:39:00 +0100
From: David Hildenbrand <dhildenb@...hat.com>
To: Oscar Salvador <osalvador@...e.de>, Hui Zhu <hui.zhu@...ux.dev>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
 Muchun Song <muchun.song@...ux.dev>, linux-kernel@...r.kernel.org,
 linux-mm@...ck.org, Hui Zhu <zhuhui@...inos.cn>
Subject: Re: [PATCH v4 0/2] mm/hugetlb: refactor sysfs/sysctl interfaces

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@...inos.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ