Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp246459rwd; Wed, 31 May 2023 22:47:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7YVguKIWBRtLzBag6DojRnP7et7AmC4Cfw4BDhbeakm+EeoozD21+Hr1njCtrQhPT7T5uk X-Received: by 2002:a05:6a00:1583:b0:636:f5f4:5308 with SMTP id u3-20020a056a00158300b00636f5f45308mr11566444pfk.7.1685598479095; Wed, 31 May 2023 22:47:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685598479; cv=none; d=google.com; s=arc-20160816; b=OUo6qOktlmf80rZz7a9lBwDhWLTKrEx5v9dWu21sH9FE8Zsqnw0grhE7k1M0DWQA8t GlE7C2taIVxEwyvfGxMBK8icy7snayutafdE3wz5cw3qqfgNMRI4ttV2JeXZuwxko22v xJOv22vTOtkIAYJUTDg2/WAe8RmQC8gszEwiISjLPkKUPxbJQ4ooLxnahZnBVc9fOrYV ggio9AtW5rXTSlmV4b3TkQ0N2MQKPhlFNrmKHhyyU2H0et+oN4kyojk7fDoO232h5fJt EhfbTtNihVlV+C01JM1x5VkwIAGR0FFmQnq8KxbS9UUzeLHXF7YAig2PO9xIwUdb+21f mOWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:in-reply-to :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=aUenvpmHVKaOGRWzayQ33h1nr5MyWcwf/XQZl+5lk0c=; b=ej2xW8OJqkZLJYKhuS+/M4MNdgJ2VKyHYr8fN0grj4uNjRRgnjz/rsBaP+PbJFajoQ cTmpvrcH/eU9T5UIq+HoliDrrPGGgAdmMyboBMrAXFIPwxv9/di8lL1PZe+NYye1RHBY aH4NpCBtaUfvbwXg7kXB4681cEde2lLj9Vgf5fZJGVj84mjw+0WKeG7KNHrNm2Mt7Tz2 ooBu90J1nyj91wBjyBXIy1Ny6/GmwzuOVaR47o+8ZbCbRbGfC0WEvnty43EGKZctk1uG zlk6o1Z2QlLFDAAdir91DoYbJuqBAfr6dxpt4I7yjgF1AAhYccMyu7z2bG2X5D81ncxq qmyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=S+XGj64y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 3-20020a620503000000b0064ff1f04376si4879017pff.253.2023.05.31.22.47.46; Wed, 31 May 2023 22:47:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=S+XGj64y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230465AbjFAFfp (ORCPT + 99 others); Thu, 1 Jun 2023 01:35:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229553AbjFAFfn (ORCPT ); Thu, 1 Jun 2023 01:35:43 -0400 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4928512C; Wed, 31 May 2023 22:35:41 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20230601053538euoutp010adf47f22b7623a8c54a0994dcebcf80~kcjZfOcRI0492804928euoutp01f; Thu, 1 Jun 2023 05:35:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20230601053538euoutp010adf47f22b7623a8c54a0994dcebcf80~kcjZfOcRI0492804928euoutp01f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1685597738; bh=aUenvpmHVKaOGRWzayQ33h1nr5MyWcwf/XQZl+5lk0c=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=S+XGj64yFyDX/2ZUKbRKMmEGm1+2r1exwJXasOdFT4XnyOnYDxkmO9JFPSUD2oAXT tPiM6DdBJqXth3PQ+C3w4oAO24MSL9Nm05fa04TQuhas2TQYy3EgZ9Nj33cUrEFzsK y2ytRHQDXSHS29gkMdAekM8DW7jOcED7jUwXjUl0= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230601053538eucas1p28e1eb765accfa7c9b0b42254983975c1~kcjZOJkxh3051330513eucas1p2u; Thu, 1 Jun 2023 05:35:38 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 74.50.11320.92E28746; Thu, 1 Jun 2023 06:35:37 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20230601053537eucas1p1f1d8e821e9e9b6728072a8e541b8dbfc~kcjYwUIWk3153831538eucas1p1k; Thu, 1 Jun 2023 05:35:37 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230601053537eusmtrp165609602eeefa8d933fd26c91f849636~kcjYvkIki1921519215eusmtrp1K; Thu, 1 Jun 2023 05:35:37 +0000 (GMT) X-AuditID: cbfec7f4-97dff70000022c38-9a-64782e29ac43 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 81.A1.10549.92E28746; Thu, 1 Jun 2023 06:35:37 +0100 (BST) Received: from CAMSVWEXC02.scsc.local (unknown [106.1.227.72]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230601053537eusmtip127e4a767963c24da38a6678480517f99~kcjYheqTQ2607526075eusmtip1U; Thu, 1 Jun 2023 05:35:37 +0000 (GMT) Received: from localhost (106.210.248.78) by CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 1 Jun 2023 06:35:35 +0100 Date: Thu, 1 Jun 2023 07:35:34 +0200 From: Joel Granados To: Luis Chamberlain CC: , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v2 1/2] sysctl: remove empty dev table Message-ID: <20230601053534.272v4berfml7vytz@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="wy2llykbgglghma3" Content-Disposition: inline In-Reply-To: X-Originating-IP: [106.210.248.78] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) X-Brightmail-Tracker: H4sIAAAAAAAAA2WSfUxTVxjGd24Pt7e44qXVcSgLSmXGyYdzce6s6tBIsusf07EmbtMoNnAH ZLR1LQiOuNQoOupwCBNrBQMTC1KmtAUiRT7GHB/t+BhIwM19BCWAfINEtKOOcnEz2X/P+7zP 7+R5k0PxRB2khEpQJbEalSJRSnrDqqYn7WGvh6fGvjHmlOG8G2Ukns9u4uOZcjeJ2xoRrvwh 3wtPD/8F8J/TvwH8rOokH+da/LDlGwrnOPIJ/PMZJb47mAfxrdpWiLvteSTud3QSuMP+vRfu yxoAuKuhgMDNmQ0EtlnP87BrbiEyV37fC5uqd29HzOP0s5BxPc0GzCXdL5CpNv7OZyan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p/exZQo20WT7LnZ8H 3SIjfKcWCns0LTrt7yfywi5ou6B9d7f1sovVghwH5lQs22mXenx68H4eHta/1sd36k0obuv7 fviK4JV+RS+Xy5+Pfg7Qv6KWlt/c/M5zpkXkvMwkJZbijERDLeai4kQA4i9Da/wDAAA= X-CMS-MailID: 20230601053537eucas1p1f1d8e821e9e9b6728072a8e541b8dbfc X-Msg-Generator: CA X-RootMTR: 20230526222249eucas1p1d38aca6c5a5163bd6c48b3a56e2618b4 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230526222249eucas1p1d38aca6c5a5163bd6c48b3a56e2618b4 References: <20230526222207.982107-1-mcgrof@kernel.org> <20230526222207.982107-2-mcgrof@kernel.org> <20230529200457.a42hwn7cq6np5ur4@localhost> X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --wy2llykbgglghma3 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 30, 2023 at 03:55:10PM -0700, Luis Chamberlain wrote: > On Tue, May 30, 2023 at 09:42:04AM -0700, Luis Chamberlain wrote: > > On Mon, May 29, 2023 at 10:04:57PM +0200, Joel Granados wrote: > > > On Fri, May 26, 2023 at 03:22:05PM -0700, Luis Chamberlain wrote: > > > > Now that all the dev sysctls have been moved out we can remove the > > > > dev sysctl base directory. We don't need to create base directories, > > > > they are created for you as if using 'mkdir -p' with register_syctl= () > > > > and register_sysctl_init(). For details refer to sysctl_mkdir_p() > > > > usage. > > > >=20 > > > > We save 90 bytes with this changes: > > > >=20 > > > > ./scripts/bloat-o-meter vmlinux.2.remove-sysctl-table vmlinux.3-rem= ove-dev-table > > > > add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-90 (-90) > > > > Function old new delta > > > > sysctl_init_bases 111 85 -26 > > > > dev_table 64 - -64 > > > > Total: Before=3D21257057, After=3D21256967, chg -0.00% > > > >=20 > > > > Signed-off-by: Luis Chamberlain > > > > --- > > > > kernel/sysctl.c | 5 ----- > > > > 1 file changed, 5 deletions(-) > > > >=20 > > > > diff --git a/kernel/sysctl.c b/kernel/sysctl.c > > > > index fa2aa8bd32b6..a7fdb828afb6 100644 > > > > --- a/kernel/sysctl.c > > > > +++ b/kernel/sysctl.c > > > > @@ -2344,16 +2344,11 @@ static struct ctl_table debug_table[] =3D { > > > > { } > > > > }; > > > > =20 > > > > -static struct ctl_table dev_table[] =3D { > > > > - { } > > > > -}; > > > > - > > > > int __init sysctl_init_bases(void) > > > > { > > > > register_sysctl_init("kernel", kern_table); > > > > register_sysctl_init("vm", vm_table); > > > > register_sysctl_init("debug", debug_table); > > > > - register_sysctl_init("dev", dev_table); > > > > =20 > > > > return 0; > > > > } > > > > --=20 > > > > 2.39.2 > > > >=20 > > > LGTM. > >=20 > > BTW, please use proper tags like Reviewed-by, and so on even if you use > > LGTM so that then if anyone uses things like b4 it can pick the tags for > > you. > >=20 > > > But why was dev there to begin with? > >=20 > > I will enhance the commit log to mention that, it was there because > > old APIs didn't create the directory for you, and now it is clear it > > is not needed. I checked ant he dev table was there since the beginning > > of sysctl.c on v2.5.0. >=20 > I've extended the commmit log with this very importance piece of > information: Awesome! >=20 > The empty dev table has been in place since the v2.5.0 days because back > then ordering was essentialy. But later commit 7ec66d06362d ("sysctl: *essential ? > Stop requiring explicit management of sysctl directories"), merged as of > v3.4-rc1, the entire ordering of directories was replaced by allowing > sysctl directory autogeneration. This new mechanism introduced on v3.4 > allows for sysctl directories to automatically be created for sysctl > tables when they are needed and automatically removes them when no > sysctl tables use them. That commit also added a dedicated struct > ctl_dir as a new type for these autogenerated directories. >=20 > Luis --=20 Joel Granados --wy2llykbgglghma3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEErkcJVyXmMSXOyyeQupfNUreWQU8FAmR4LiUACgkQupfNUreW QU/qwAwAi6rcnhYVI2BuX2hsdFpNbcKsqn0J/y2RcDEfRQtNs8gWQ2Cm0VMoeTHi c+UsyYfMPX1Ehcu4Pyec0PVJDw1ri5pYDCvXJqO1VqDwMWHiezUCZd4gmHTpqhna Kfn2RCeXz/ca1049pWMTbAhO+f1xc3KMO5HvxBjR2ZLMMQLHpclbDmRCLpDb6OTa AsKDmzux+8HlMZJZZ05zKcbCsIUdNbPr0utkawKPvF9xbpy3aDuCMOgqAbyyVB9k oAcl0yxltlE1xk1JV/aKBYa2A1ly072EE5euFHJCWmvyGTdPd5Kt/HUkprcjGvE2 z38jAd3gAiLyQyNycMStGY9FuzfHIu89Yib3lIHHQCzK1R/+UZCozWVb+iDZeS0d Lm90XB8VcMn80Aw9itPyNMNuQ6W9DVgW0rTXU8XcOSA2gXhFWxJRFs0uW7GntViL Tld4mOTKqevvMu20/HTbYCxbHGhQK2qunuULMtc2gcmIoH2OlWp+y51qen9171gM D1wam5Ff =EOBb -----END PGP SIGNATURE----- --wy2llykbgglghma3--