From patchwork Tue Sep 3 03:29:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yukaixiong X-Patchwork-Id: 13787949 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 462C2CA101E for ; Tue, 3 Sep 2024 03:31:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C5D278D0126; Mon, 2 Sep 2024 23:31:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C0F4A8D0119; Mon, 2 Sep 2024 23:31:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AD4A18D0126; Mon, 2 Sep 2024 23:31:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 901DF8D0119 for ; Mon, 2 Sep 2024 23:31:09 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 0F3FEC030B for ; Tue, 3 Sep 2024 03:31:09 +0000 (UTC) X-FDA: 82522001058.25.3CECF51 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf08.hostedemail.com (Postfix) with ESMTP id 9CC8316000D for ; Tue, 3 Sep 2024 03:31:05 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf08.hostedemail.com: domain of yukaixiong@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=yukaixiong@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725334197; a=rsa-sha256; cv=none; b=PbkL2M2249T42A6JMtcdiV3Gn0hpeog6tQ8d1gy4UVByM/Xucb//HDcFnYKLT2XjpiXx0R B6CfUvhCv6xZrK2YO1yWSMmYNjA0HzdZqRpZUtabNNZyZV2WtAEom2aPUfsEb7/+p9diva wlEGQYgcj9JTX7bPwBxQ2uYVKdEQhFU= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf08.hostedemail.com: domain of yukaixiong@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=yukaixiong@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725334197; 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=D/AaPukzjCadZ3xAq+zLwcTDZuvBVVw/OrXEvTGdeig=; b=OcD8ViPreskiN3jk4rY5BxyNfGXbq1vvj+yUGwv5xjE4camMlg01y1CG6ropf8yI1zAcbj 83UEQC9W9DpxQz8hhH7R0v/jyrLZWg7I6spEZYl2YMWJAZVHlexJrHyN4/kB435bLUzK+4 7XommlL6yCnPz1a30ufakZVnr8FjZC0= Received: from mail.maildlp.com (unknown [172.19.88.194]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4WyWNJ16TYzyRMc; Tue, 3 Sep 2024 11:30:24 +0800 (CST) Received: from kwepemh100016.china.huawei.com (unknown [7.202.181.102]) by mail.maildlp.com (Postfix) with ESMTPS id BCE3B1402D0; Tue, 3 Sep 2024 11:31:00 +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; Tue, 3 Sep 2024 11:30:58 +0800 From: Kaixiong Yu To: , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v2 -next 00/15] sysctl: move sysctls from vm_table into its own files Date: Tue, 3 Sep 2024 11:29:56 +0800 Message-ID: <20240903033011.2870608-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-Rspamd-Queue-Id: 9CC8316000D X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 8com3xn6g57ci3m46o99g9hfw3eau8ni X-HE-Tag: 1725334265-173650 X-HE-Meta: U2FsdGVkX18gOgXZBPAH9xZ/MSAQWbTmzg0s8lLOCFoPg0jW4HvVDuWkUjWqQ85XpzNJk26ceusLvMxagcBO9EDSx0dBnLqDVebJJ6VHgTjItfi7ZVvvnVNG3l7LYcoRuhJkNkS56BXlLRRZ7ixQfvHlC8lgrbpWoF/t+vq38TzGylR7JoIiLlbjYA9UjX51cDHnFhFyiUGSwPaknG1nLQ3LqEY30F3vcE1Sa31716bUf8+xSXgNQ0/g3JsJ7SFHOctfaSKm/96VrcvU1ZB8dV9XY/1uo9/GmIVhKSPLaIJNlO1vIJ73CjL0IyKlYoeSqv2R1uY4JPiSnE0x21KoGhi4EG6QUS6UVh0nQvjs0+zQsVU4EU1dO/K/mM4TkiHQr5UK1nwbOqSyU7srlffpqMcU5kZA14AkXTqwT3p7u8UC5SbEZUwAtFGcpZgif3OSRBSU5bjOvyJxmnQ7UX7aM7kcvxVqY6RGPJze6U+aPaRtU2WB6v+5l6S27HdX6yQxQJOmkZx0i9z/BPtmxd7NmB1dWQckvXGPRA/1h5eS2N2qtUqHvANZ8KPypbqgq1C6Q6paT4boS2XWBNNoV1ntGzQjvNoilhuIuZLEM+w7Jatpifeb5qBjQxIhIf5dW4NjUu1JxaGz9YIsv6CcfEKeFuNouteXXc3KcutJWjdoyp+iT6wQ7MLShTKEdkbIQjo2ORhNVIB3hALftzGQMLloYJYs4PWnjmoEVET5gNGdQ4ZKsl0lTiUqIl0Eg0x/p9oxFLQHpcGXPiHSLM0Lq/4Txo3BO4NA4SpRUKsUDOHN/kPy8iad27L3wX5IbfMLz0lNxSm0cvFHnwvPH9gxEgaB926D/NsIyb4d5Gd7VTZPycUBICbkWxgFndGre2a5gAVc5zvL3zLl42Pay5bdnPcAOqHt4cC12wRIkgSPwHp4qto1AbPmwKjuA1rdKdVwkW/INS6rtusvcXgg8rNuOaO qR6gDAwm Zicz0T2x2L6V4/6RLJhvvDh+urS9W5PSiXWfvFNSC+LGasEF+dYAUgQo+sQej5L7snxh0VaAZHUqWak+u0V+H6xDIvi6HbekFs7e60bgP8mB5wDJaTrO2Dx6VptPPPnF+tfE6maVo/R8n38TcA5MQx1cN0mei8yP+l/Mawd2R50W6uRw= 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-20240902). 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 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 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 | 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 | 42 +++++- net/sunrpc/auth.c | 2 +- security/min_addr.c | 11 ++ 23 files changed, 328 insertions(+), 310 deletions(-)