Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4815628rwd; Tue, 30 May 2023 10:14:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7dkXXmdks3oP27SO0g4hlCWFgCdtjNqfwoW6GEqpI76nFOrgx4/EEnr3nvDvm2aA1QB+hC X-Received: by 2002:a17:902:9895:b0:1b0:1fc7:cbc1 with SMTP id s21-20020a170902989500b001b01fc7cbc1mr2604098plp.27.1685466866595; Tue, 30 May 2023 10:14:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685466866; cv=none; d=google.com; s=arc-20160816; b=slxCFVdzPMzVMF5/3pYNHQZmrZFUfnmKpcRF+gxKm2neeU6dnYtWiBDNwovgqxfc6N qkM6zyqvv4foUzokUamiSs4GM7IxCe7qvCcbyDnpKHfbMWsQJZamybbNudn/BZWiZW93 fJeiGwLp9r+xSKCgyV6b5PyFSbc5epLLLUHrqvRLlDN8aXH/NjR77juPf42/rTo/aARR 2akvM0jNirCsxs6gkzaieo7zVVCnRaLPn2dDu5pZveG0goNJStWiNeXG5ejt4SaLuyY6 ATCY90kgSbFdhV7mWFhnpibnNTOveTQhqyDnrYQkd94tNTXyWEAR72UeSoi0z981NU+m DENQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=HkEq4u4fLQqPB9+Uc8LE0j+FzQ0s2Sx6MblZeP2TWf0=; b=S1EL9plHfeHVPzZzrmlWWOnXu9WxbxFXs6ynJiRKGXaBliW2fdis8CcDLUQsmzLjTh MHh8SgnepwnmkpAlkggdZvCk4KX5octpqyH9AWksTF1HDcLcrra3DrVMVsDr5665e820 dHYg1GkkMkkb8IFr4l+9eEfTeU/71VFseZC44gF9+PNUxKSxf+QVYpucexyPug5WWAq/ +z/ZWkD0iOhE0+m9ev+xc/R8k7jahM7fQEApO6p4BCxAIxAUeAQ08cScvZ/IhLtF9EJR l/VNvHLKaRxgko9jug/vZJJ4Htm4HZPainAmnVnJNF0R+HG+NJdpeNdZan+3BCRN2QKq ukow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="KngQ/44P"; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jj6-20020a170903048600b001ab0993941bsi2001829plb.311.2023.05.30.10.14.13; Tue, 30 May 2023 10:14:26 -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=@infradead.org header.s=bombadil.20210309 header.b="KngQ/44P"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232123AbjE3Qmg (ORCPT + 99 others); Tue, 30 May 2023 12:42:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230096AbjE3Qmf (ORCPT ); Tue, 30 May 2023 12:42:35 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8E3798; Tue, 30 May 2023 09:42:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description; bh=HkEq4u4fLQqPB9+Uc8LE0j+FzQ0s2Sx6MblZeP2TWf0=; b=KngQ/44PUjpXp8Yv1nIcHLhU0D Prf0gH/CTO3tTP8+TyWljcFhPbZeWdpdBjc0uMjQYwEjuPZnPMvK2op/qN7E/EuV9Nn7zVxXWLw7D yFuxjNtVjuQqKwchHCl3r6jewZYdpSpeXfoaFkVBH+dBM8Wau3tRgDdupj1ldSrNBqLsz0pGK+oel DVgPLH8iV1lvaAyWGP6j8pvunRui6JQW/FWxp6vw2vaTMrER6MP21EhQ15HDSyLTyzmL2skbsCZBy 5mtGdfpAhjatcbQqmw/Am5vJrdIIRJy2z7cVvdFIo68HTivNGmtH+jybTmu2A5KbIBq48c4ltN55I +2pgfO6w==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1q42Q8-00EbtC-1O; Tue, 30 May 2023 16:42:04 +0000 Date: Tue, 30 May 2023 09:42:04 -0700 From: Luis Chamberlain To: Joel Granados Cc: keescook@chromium.org, yzaikin@google.com, ebiederm@xmission.com, dave.hansen@intel.com, arnd@arndb.de, bp@alien8.de, James.Bottomley@hansenpartnership.com, deller@gmx.de, tglx@linutronix.de, mingo@redhat.com, x86@kernel.org, hpa@zytor.com, luto@kernel.org, peterz@infradead.org, brgerst@gmail.com, christophe.jaillet@wanadoo.fr, kirill.shutemov@linux.intel.com, jroedel@suse.de, akpm@linux-foundation.org, willy@infradead.org, linux-parisc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] sysctl: remove empty dev table Message-ID: References: <20230526222207.982107-1-mcgrof@kernel.org> <20230526222207.982107-2-mcgrof@kernel.org> <20230529200457.a42hwn7cq6np5ur4@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20230529200457.a42hwn7cq6np5ur4@localhost> Sender: Luis Chamberlain X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 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-remove-= 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. 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. > But why was dev there to begin with? 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. Luis