From: "David Hildenbrand (Red Hat)" <david@kernel.org>
To: Hui Zhu <hui.zhu@linux.dev>,
Andrew Morton <akpm@linux-foundation.org>,
Muchun Song <muchun.song@linux.dev>,
Oscar Salvador <osalvador@suse.de>,
David Hildenbrand <david@redhat.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Cc: Geliang Tang <geliang@kernel.org>, Hui Zhu <zhuhui@kylinos.cn>
Subject: Re: [PATCH 1/2] mm/hugetlb: extract sysfs into hugetlb_sysfs.c
Date: Mon, 3 Nov 2025 17:28:54 +0100 [thread overview]
Message-ID: <cbee126b-5a3b-4f03-a049-2d8b86b4e5f9@kernel.org> (raw)
In-Reply-To: <fa0fee2b8c2e54cb2437db44579475492c19e94d.1762156954.git.zhuhui@kylinos.cn>
On 03.11.25 09:22, Hui Zhu wrote:
> From: Geliang Tang <geliang@kernel.org>
>
> Currently, hugetlb.c contains both core management logic and sysfs
> interface implementations, making it difficult to maintain. This patch
> extracts the sysfs-related code into a dedicated file to improve code
> organization.
>
> The following components are moved to mm/hugetlb_sysfs.c:
> - hugetlb page demote functions (demote_free_hugetlb_folios,
> demote_pool_huge_page)
> - sysfs attribute definitions and handlers
> - sysfs kobject management functions
> - NUMA per-node hstate attribute registration
>
> Several inline helper functions and macros are moved to
> mm/hugetlb_internal.h:
> - hstate_is_gigantic_no_runtime()
> - next_node_allowed()
> - get_valid_node_allowed()
> - hstate_next_node_to_alloc()
> - hstate_next_node_to_free()
> - for_each_node_mask_to_alloc/to_free macros
>
> To support code sharing, these functions are changed from static to
> exported symbols:
> - remove_hugetlb_folio()
> - add_hugetlb_folio()
> - init_new_hugetlb_folio()
> - prep_and_add_allocated_folios()
> - __nr_hugepages_store_common()
>
> The Makefile is updated to compile hugetlb_sysfs.o when
> CONFIG_HUGETLBFS is enabled. This maintains all existing functionality
> while improving maintainability by separating concerns.
>
> Signed-off-by: Geliang Tang <geliang@kernel.org>
> Signed-off-by: Hui Zhu <zhuhui@kylinos.cn>
> ---
[...]
> index 000000000000..63ab13cfb072
> --- /dev/null
> +++ b/mm/hugetlb_internal.h
> @@ -0,0 +1,110 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Internal HugeTLB definitions.
> + *
> + * Copyright (C) 2025 KylinSoft Corporation.
> + * Author: Geliang Tang <geliang@kernel.org>
> + */
So, you move some code and suddenly have copyright and authored that code.
Especially given the cove letter says "The code is moved
as-is, with only minor formatting adjustments for code style
consistency."
?
--
Cheers
David
next prev parent reply other threads:[~2025-11-03 16:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-03 8:22 [PATCH 0/2] mm/hugetlb: refactor sysfs/sysctl interfaces Hui Zhu
2025-11-03 8:22 ` [PATCH 1/2] mm/hugetlb: extract sysfs into hugetlb_sysfs.c Hui Zhu
2025-11-03 16:28 ` David Hildenbrand (Red Hat) [this message]
2025-11-04 2:41 ` hui.zhu
2025-11-04 9:05 ` David Hildenbrand (Red Hat)
2025-11-03 8:22 ` [PATCH 2/2] mm/hugetlb: extract sysctl into hugetlb_sysctl.c Hui Zhu
2025-11-04 4:43 ` [PATCH 0/2] mm/hugetlb: refactor sysfs/sysctl interfaces SeongJae Park
2025-11-04 8:39 ` hui.zhu
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=cbee126b-5a3b-4f03-a049-2d8b86b4e5f9@kernel.org \
--to=david@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=geliang@kernel.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).