From patchwork Mon Aug 26 12:04:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yukaixiong X-Patchwork-Id: 13777714 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 B1914C5321D for ; Mon, 26 Aug 2024 12:06:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 90AA76B04D2; Mon, 26 Aug 2024 08:06:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 85A2E6B04D1; Mon, 26 Aug 2024 08:06:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6AF6B6B04D0; Mon, 26 Aug 2024 08:06:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 412066B04CC for ; Mon, 26 Aug 2024 08:06:03 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id F0A6E121006 for ; Mon, 26 Aug 2024 12:06:02 +0000 (UTC) X-FDA: 82494268164.16.6C079DD Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by imf18.hostedemail.com (Postfix) with ESMTP id 8F0B81C0020 for ; Mon, 26 Aug 2024 12:06:00 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=none; spf=pass (imf18.hostedemail.com: domain of yukaixiong@huawei.com designates 45.249.212.191 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=1724673893; 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=ZnfA3x9RVXqmtoLknuBgP+Vg5gA+R5AWpCMbr0LCJAc=; b=VybI/1d8MjIXoT4U95IG+gyqHQ9bPernSARMNTMoTOpYTi4Ow3DA0DgoMk5uv0P0nrkf9k /SM0dNbNFds/TTlbnOX9n0oqgnoeWuIl/2htUTp4HHjlRrpqaNvLYoUUFfpO7OUC6CpRcK uRqWg4GEBvc2EcbZ1h/6OlHqe+YTihA= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none; spf=pass (imf18.hostedemail.com: domain of yukaixiong@huawei.com designates 45.249.212.191 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=1724673893; a=rsa-sha256; cv=none; b=Dzx45Dhvgb/cIx7a+rjv7s0lx2r1IzNtuqtZlHfX2jZP9G9JyxQ3RQKD7M1ZIRFoxGZVC0 RxfradWfl6ZgLW+n35ZgjF80Y77vCxXBv3kzpXJhbumxNWzW+asYUkVIMfnGbfCofGOc75 U15nFYVCrKZkeESBy+LZHC4HF2j+R1Q= Received: from mail.maildlp.com (unknown [172.19.163.44]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4WsqB02FC8z1j7CK; Mon, 26 Aug 2024 20:05:12 +0800 (CST) Received: from kwepemh100016.china.huawei.com (unknown [7.202.181.102]) by mail.maildlp.com (Postfix) with ESMTPS id E18471402E1; Mon, 26 Aug 2024 20:05:20 +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; Mon, 26 Aug 2024 20:05:18 +0800 From: Kaixiong Yu To: , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH -next 00/15] sysctl: move sysctls from vm_table into its own files Date: Mon, 26 Aug 2024 20:04:34 +0800 Message-ID: <20240826120449.1666461-1-yukaixiong@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.32] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemh100016.china.huawei.com (7.202.181.102) X-Stat-Signature: et4o4h1eeycxwsreqkmqhhbmki81mwfi X-Rspam-User: X-Rspamd-Queue-Id: 8F0B81C0020 X-Rspamd-Server: rspam02 X-HE-Tag: 1724673960-890490 X-HE-Meta: U2FsdGVkX1+aTq7kWnyN4/dbV61RyuoLLAh0YTxCk0lJ5naD7l6rWRyX8bpbzUh4EorMGBQJmi3NLE9f7tG0mWXDrcarVGPU/qOu+J3aeDxD7x0WINhfud+nVlUIHMTWUxBU3+5hX3ZEc/eMwVI6Vw5nsWgQOBX5ZL6J6ooHBNuxRLqFws+VE6/MnoMM4X/PGfYo8IxX4lIjV/I2LS+VQKrIzkc4iS6W1x1yNr230Vrg4Mmbk3jCVyf98E9cQUjUP69RvW4AJoYRrRLz9D7KeBeXn7ZykcY6f+UzKDQ4omhyuae08TZlvlMZQI6pP9TmmbABwUcCJ8+SG+nauxD15lSKbNRXmtJOBJUeG1JPHIS3gAKbwMpGTO03noBD76uJl9VXSDEy+2haS19XH0L2meIzBBGp69XjS56M9oo2Zok1j167N8tWFB5E/sQ7iuhq+yr06ixz9wFUtaUVb3ZgLtgR8301lxnz5x7R7y9TqyrT52BFA49Ej/5R/32TmNcuPOtPM3HJZeKaGObkKhjFXtCL6qNU0/DFNaoGwr5JO+yP7SVDizhX3Zbukmp1HaV8ndI5aCciKCaeZyS0N0KfNfAbiJwTW+/Bez4BhbdkOGMYmSlKC9qCkac/PVvbtAB0g0J+aVXSwdHP6/zWaD165eL4Q7adUy+JzAP0FcWeFnkv9gldezFiD6yV5MDv8lfHio1v9pXjzPbAbiEte1uYnfMdmJggWPPyAOplWS1g5Tgxy6LwUN6E4k+zeDyX0TH9h5YkDo4lXWpTmcyMB2m8kfNo7dITU0pjhl0IUzo2eJnpxr2YQRhI67kerW74TupF/f8SrjLy7lstRWH08i/Skp8+4vWSptNLvQo0tjG7sHlQpO9N/dtRTa+s7TV0DRHw+R4W1xlPj1v4w/of0k7J4Ntq+5t1wY6lC8D1LJjkdslyo98dONzMBW5dPBKnhK9iGN+57tSrpdEkeRaEnpL aR+qhLG0 qqSiud6yARouj7cvWaXVfqofjl+s/ickjRqHCtx0UHVSJaqUxwQbbf20oB2iClYTm88IAVbxdWrMRsEhXdUUBbeRwAf46Enb0Hzll2sKj+0ZDaxcP1GKbZSFLdktrkL5q0l/7hNi5vv8NoG2OooMo2Lxekjf/wDnYLPNH 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-20240823). 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. Kaixiong Yu (15): mm: vmstat: move sysctls to its own files mm: filemap: move sysctl to its own file mm: swap: move sysctl to its own file mm: vmscan: move vmscan sysctls to its own file mm: util: move sysctls into it own files mm: mmap: move sysctl into its own file security: min_addr: move sysctl into its own file mm: nommu: move sysctl to its own file fs: fs-writeback: move sysctl to its own file fs: drop_caches: move sysctl to its own file sunrpc: use vfs_pressure_ratio() helper fs: dcache: move the sysctl into its own file x86: vdso: move the sysctl into its own file sh: vdso: move the sysctl into its own file 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 | 28 ++-- include/linux/dcache.h | 7 +- include/linux/mm.h | 42 ------ 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 | 75 ++++++++++ mm/nommu.c | 15 +- mm/swap.c | 16 ++- mm/swap.h | 1 + mm/util.c | 68 +++++++-- mm/vmscan.c | 23 +++ mm/vmstat.c | 42 +++++- net/sunrpc/auth.c | 2 +- security/min_addr.c | 11 ++ 23 files changed, 349 insertions(+), 330 deletions(-) Reviewed-by: Kees Cook