From patchwork Thu Oct 10 15:22:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yukaixiong X-Patchwork-Id: 13830191 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D64B4CF11F5 for ; Thu, 10 Oct 2024 14:11:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4A5E46B0082; Thu, 10 Oct 2024 10:11:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 456236B0083; Thu, 10 Oct 2024 10:11:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 31D0D6B0085; Thu, 10 Oct 2024 10:11:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 143D36B0082 for ; Thu, 10 Oct 2024 10:11:41 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 3100FA02C0 for ; Thu, 10 Oct 2024 14:11:34 +0000 (UTC) X-FDA: 82657880760.05.280AE77 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf29.hostedemail.com (Postfix) with ESMTP id 0C9C9120024 for ; Thu, 10 Oct 2024 14:11:35 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=none; spf=pass (imf29.hostedemail.com: domain of yukaixiong@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=yukaixiong@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728569316; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=l6/89wwNi/NQzxF/edLSerUXhI9iHV/Q5QSV5XYCGls=; b=p4MjoLnwkfGmbYWfsLoj5BRNrC97beA0umiktONWJ/xJcyaIF6A/vqTwwA4cCdKbLo6b0W xBsbokjmzk7aMaTZXD0DPNZHwC2w7v0Ch8eukMlUWZcykzpT4pS7mbZ7ZTrQfQR4PpZ8rQ GXV05PpDUkprIr4WZeXtZSIT0CqrpGs= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=none; spf=pass (imf29.hostedemail.com: domain of yukaixiong@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=yukaixiong@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728569316; a=rsa-sha256; cv=none; b=3eyShJKXcsar4VbSO/efXDVgZGHSeOA3S6xnjXROQL2E4Hob5+NQ3E6y76DhghWt6Apqoa BZaT5ZXCfLTKv7SRPYay9DjAuMuMdjSMCfyFJDFk5TonwoSfdyTuQ23ej9sfWRIBiUDx0p rbPGctQBHS3p21nv6J5Wz0blpkIuE0c= Received: from mail.maildlp.com (unknown [172.19.88.105]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4XPWpx4sxVz10N5x; Thu, 10 Oct 2024 22:09:45 +0800 (CST) Received: from kwepemh100016.china.huawei.com (unknown [7.202.181.102]) by mail.maildlp.com (Postfix) with ESMTPS id BCD6D1402CA; Thu, 10 Oct 2024 22:11:30 +0800 (CST) Received: from huawei.com (10.175.113.32) by kwepemh100016.china.huawei.com (7.202.181.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 10 Oct 2024 22:11:27 +0800 From: Kaixiong Yu To: , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v3 -next 00/15] sysctl: move sysctls from vm_table into its own files Date: Thu, 10 Oct 2024 23:22:00 +0800 Message-ID: <20241010152215.3025842-1-yukaixiong@huawei.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.32] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemh100016.china.huawei.com (7.202.181.102) X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 0C9C9120024 X-Stat-Signature: my1ww4j9jngyx8cga1bh38n4e4nmj4no X-Rspam-User: X-HE-Tag: 1728569495-598873 X-HE-Meta: U2FsdGVkX19hXkswkf72qf3JzGpMckacoaeTKu/NCYFDwiuTR3f1uu1Zehgr/zxvKB6uACpEYYymtiHzSMgFkpfEcjHdb+vvcRdxQqgo5iWdvKQtPzs7QB10gK/BmoWCQFsF6czCrlWmksuX82cZT7vFeCYGPK7HP0ibR9q2dcEMBRJttxWBdGaPkD3kpFlrG0QIQLunDczstc5vRknKKMh+XLyb6dgr1nU1I9njn/tLTRoBS074skPCVd2aQ1XMUXe8LDqaqjRTTpqGJ5mQwnS3o+R6Lh4yXIAGxvYXSQCYQVM+fx4zVqlSJ8S0L6oUEKk4g3gVxN4L5plf4+AKwi5jS9a5odpXDW2rsTDjHsyrQUn/gBoVKtbAAn1/OfZeEc+AY2NC97TecXSEJ/0yTUAYQhZxZ+i0D8REm7XqQxMPcd8tM+ip1F/9A1MyB2qm2nfEx27r/rFa+uXAdBe10wM7j0Bq35n6ynjAceqOAqF+6qBvv6l08IGiImzWlKvjQDmgrkRAVt1Js0Wkkdcp017GtahSz6BXBPE+eSlSTLMhdQwgAnpR+ZFgAGFCO2nuKE/IdDeXxdRPB+vAimjuGjQrMJ8sqkDSoHnfcgl/HAtfcbop52xr2CpEXUiStOUe76I9aTdcO1adwsNlXuTYY8ipoUG98SYXNPepLubQSuMScz/vWg2WACJBaAuraJsg2ZKlrUC3WR8qscm0QVZCNtIFFWBDMmRm78J/9RHqGuKXPyZMagKsopMB+x+4M1D9EbxBfA3ao7m6v7X1u3lz9AgnLs+bVvjrobV7X8nfKt2WG3qJHkwZ6oEtUGSe/SF0JQXKWyc2dbyLCsHQCl3OeEgXM5cBbJdef76xAhDdIguMKVMh5rx7gS5mWBciDQXMDkRiU4QnlkMrX88Dl0MrwbL5viUpDV/8bAlnkGXZ2U8XfvNuO9tr0PBPdqhlC3lDnwYZnk28f3T9JCbwEc8 JkGYIjVG QP9sg1fTpIBxruiigKrR/7u1jO3fGUIMFK2cXR59BWprVJIekY2O3K5FIBvxHF5+GRCVVVB/gBlvw6kkrCMm2RqGqcYGZ1/b9GMInmDSg2R2cUuR6UN9JWjCohUUD3Kbv9cKQz1saMnewzF95NhF4Ey8d//rp6N3anhrWJg1almxituuVCi2Ftd9HRg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This patch series moves sysctls of vm_table in kernel/sysctl.c to places where they actually belong, and do some related code clean-ups. After this patch series, all sysctls in vm_table have been moved into its own files, meanwhile, delete vm_table. All the modifications of this patch series base on linux-next(tags/next-20241010). To test this patch series, the code was compiled with both the CONFIG_SYSCTL enabled and disabled on arm64 and x86_64 architectures. After this patch series is applied, all files under /proc/sys/vm can be read or written normally. Changes in v3: - change patch1~10, patch14 title suggested by Joel Granados - change sysctl_stat_interval to static type in patch1 - add acked-by from Paul Moore in patch7 - change dirtytime_expire_interval to static type in patch9 - add acked-by from Anna Schumaker in patch11 Changes in v2: - fix sysctl_max_map_count undeclared issue in mm/nommu.c for patch6 - update changelog for patch7/12, suggested by Kees/Paul - fix patch8, sorry for wrong changes and forget to built with NOMMU - add reviewed-by from Kees except patch8 since patch8 is wrong in v1 - add reviewed-by from Jan Kara, Christian Brauner in patch12 Kaixiong Yu (15): mm: vmstat: move sysctls to mm/vmstat.c mm: filemap: move sysctl to mm/filemap.c mm: swap: move sysctl to mm/swap.c mm: vmscan: move vmscan sysctls to mm/vmscan.c mm: util: move sysctls to mm/util.c mm: mmap: move sysctl to mm/mmap.c security: min_addr: move sysctl to security/min_addr.c mm: nommu: move sysctl to mm/nommu.c fs: fs-writeback: move sysctl to fs/fs-writeback.c fs: drop_caches: move sysctl to fs/drop_caches.c sunrpc: use vfs_pressure_ratio() helper fs: dcache: move the sysctl to fs/dcache.c x86: vdso: move the sysctl to arch/x86/entry/vdso/vdso32-setup.c sh: vdso: move the sysctl to arch/sh/kernel/vsyscall/vsyscall.c sysctl: remove unneeded include arch/sh/kernel/vsyscall/vsyscall.c | 14 ++ arch/x86/entry/vdso/vdso32-setup.c | 16 ++- fs/dcache.c | 21 ++- fs/drop_caches.c | 23 ++- fs/fs-writeback.c | 30 ++-- include/linux/dcache.h | 7 +- include/linux/mm.h | 23 --- include/linux/mman.h | 2 - include/linux/swap.h | 9 -- include/linux/vmstat.h | 11 -- include/linux/writeback.h | 4 - kernel/sysctl.c | 221 ----------------------------- mm/filemap.c | 18 ++- mm/internal.h | 10 ++ mm/mmap.c | 54 +++++++ mm/nommu.c | 15 +- mm/swap.c | 16 ++- mm/swap.h | 1 + mm/util.c | 67 +++++++-- mm/vmscan.c | 23 +++ mm/vmstat.c | 44 +++++- net/sunrpc/auth.c | 2 +- security/min_addr.c | 11 ++ 23 files changed, 330 insertions(+), 312 deletions(-)