Re: [PATCH v2 1/2] fs/proc: optimize exactly register one ctl_table

From: Luis Chamberlain
Date: Tue Mar 01 2022 - 12:44:55 EST


On Tue, Mar 01, 2022 at 07:53:40PM +0800, Meng Tang wrote:
> Sysctls are being moved out of kernel/sysctl.c and out to
> their own respective subsystems / users to help with easier
> maintance and avoid merge conflicts. But when we move just
> one entry and to its own new file the last entry for this
> new file must be empty, so we are essentialy bloating the
> kernel one extra empty entry per each newly moved sysctl.
>
> To help with this, this adds support for registering just
> one ctl_table, therefore not bloating the kernel when we
> move a single ctl_table to its own file.
>
> Suggested-by: Matthew Wilcox <willy@xxxxxxxxxxxxx>
> Signed-off-by: Meng Tang <tangmeng@xxxxxxxxxxxxx>

Please extend the commit log to justify why we have to add
so much code, you mentioned it to me before, now just please
write that in the commit log.

Can you really not add helpers first so that these helpers
are used by both paths?

Luis