From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-183.mta1.migadu.com (out-183.mta1.migadu.com [95.215.58.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 11835313275 for ; Tue, 4 Nov 2025 08:38:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.183 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762245484; cv=none; b=QOoG3oYGJLpEQIqat9uCF3WXlXKXAIpoqylHPeXPuFRdPkGtuVhwhN4hePBKwppX/Hd4jQQMDUQ1Q1jo/QzNuvwVXunykAngxBX5ae61loBaMaEkuxl+xH1KIaH9n1h5KPQJZ8X+qPCkvlRjMntns8hFJPKSra1ZE1tFX/TEAec= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762245484; c=relaxed/simple; bh=R6iW/mU31KGdvS84BeKMSKNktsVhPwIhbdJwzaLBxXU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PzrwbcMfaSZN9UVZUkrLP0/q82mYUW9qUm0jrvviVqzfpEB6QH+23YZMmUNioDAwTj008c/i8wAT8eRbAwum2OONHhl8QORjuConKlsbp1HY4Fng5ffjV2G12JTn+fH9044uUeSrLxZsNJL+963L4LdQzUoOKL5shs3WjpnOFfE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=TTNsfDWP; arc=none smtp.client-ip=95.215.58.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="TTNsfDWP" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1762245478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=OgNnOMsS50KZEW2Uu5LLuchS1BcFg93kxAnhG0zifF0=; b=TTNsfDWPw4SN7MyW7OwQGbloCmpkQ4GOZn86TPZAjHsddPG7e2W8c65FrBum0rATGdfa8H 0/4NV6WriY+ObP9+5vFDgWgNT4QwnbpZZ6CHvKC5Mw5fWKwM94z3ZOV/y3ymInTCNXuy6u lV4zLs2mxsGWY0Uf26e29y97bu5H4Gg= From: Hui Zhu To: Andrew Morton , Muchun Song , Oscar Salvador , David Hildenbrand , linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Hui Zhu Subject: [PATCH v3 0/2] mm/hugetlb: refactor sysfs/sysctl interfaces Date: Tue, 4 Nov 2025 16:37:41 +0800 Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT From: Hui Zhu 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: 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 MAINTAINERS | 2 + mm/Makefile | 2 +- mm/hugetlb.c | 852 +----------------------------------------- mm/hugetlb_internal.h | 113 ++++++ mm/hugetlb_sysctl.c | 133 +++++++ mm/hugetlb_sysfs.c | 629 +++++++++++++++++++++++++++++++ 6 files changed, 887 insertions(+), 844 deletions(-) create mode 100644 mm/hugetlb_internal.h create mode 100644 mm/hugetlb_sysctl.c create mode 100644 mm/hugetlb_sysfs.c -- 2.43.0