linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: Joel Granados <j.granados@samsung.com>
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
Date: Tue, 30 May 2023 09:42:04 -0700	[thread overview]
Message-ID: <ZHYnXKb8g0zSJe7+@bombadil.infradead.org> (raw)
In-Reply-To: <20230529200457.a42hwn7cq6np5ur4@localhost>

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.
> > 
> > We save 90 bytes with this changes:
> > 
> > ./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=21257057, After=21256967, chg -0.00%
> > 
> > Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
> > ---
> >  kernel/sysctl.c | 5 -----
> >  1 file changed, 5 deletions(-)
> > 
> > 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[] = {
> >  	{ }
> >  };
> >  
> > -static struct ctl_table dev_table[] = {
> > -	{ }
> > -};
> > -
> >  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);
> >  
> >  	return 0;
> >  }
> > -- 
> > 2.39.2
> > 
> 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

  reply	other threads:[~2023-05-30 16:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-26 22:22 [PATCH v2 0/2] kernel/sysctl.c: remove to major base directories Luis Chamberlain
2023-05-26 22:22 ` [PATCH v2 1/2] sysctl: remove empty dev table Luis Chamberlain
2023-05-29 20:04   ` Joel Granados
2023-05-30 16:42     ` Luis Chamberlain [this message]
2023-05-30 21:10       ` Joel Granados
2023-05-30 22:55       ` Luis Chamberlain
2023-06-01  5:35         ` Joel Granados
2023-05-30 21:13   ` Joel Granados
2023-05-26 22:22 ` [PATCH v2 2/2] signal: move show_unhandled_signals sysctl to its own file Luis Chamberlain
2023-05-29 20:05   ` Joel Granados
2023-05-30 21:14   ` Joel Granados

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZHYnXKb8g0zSJe7+@bombadil.infradead.org \
    --to=mcgrof@kernel.org \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=bp@alien8.de \
    --cc=brgerst@gmail.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dave.hansen@intel.com \
    --cc=deller@gmx.de \
    --cc=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=j.granados@samsung.com \
    --cc=jroedel@suse.de \
    --cc=keescook@chromium.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=willy@infradead.org \
    --cc=x86@kernel.org \
    --cc=yzaikin@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).