* [PATCH] sysctl: Merge adjacent CONFIG_TREE_RCU blocks @ 2022-05-17 15:07 Geert Uytterhoeven 2022-05-17 15:57 ` Paul E. McKenney 0 siblings, 1 reply; 5+ messages in thread From: Geert Uytterhoeven @ 2022-05-17 15:07 UTC (permalink / raw) To: Luis Chamberlain, Kees Cook, Iurii Zaikin, Paul E . McKenney Cc: linux-fsdevel, linux-kernel, Geert Uytterhoeven There are two adjacent sysctl entries protected by the same CONFIG_TREE_RCU config symbol. Merge them into a single block to improve readability. Use the more common "#ifdef" form while at it. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> --- kernel/sysctl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 82bcf5e3009fa377..597069da18148f42 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -2227,7 +2227,7 @@ static struct ctl_table kern_table[] = { .extra1 = SYSCTL_ZERO, .extra2 = SYSCTL_ONE, }, -#if defined(CONFIG_TREE_RCU) +#ifdef CONFIG_TREE_RCU { .procname = "panic_on_rcu_stall", .data = &sysctl_panic_on_rcu_stall, @@ -2237,8 +2237,6 @@ static struct ctl_table kern_table[] = { .extra1 = SYSCTL_ZERO, .extra2 = SYSCTL_ONE, }, -#endif -#if defined(CONFIG_TREE_RCU) { .procname = "max_rcu_stall_to_panic", .data = &sysctl_max_rcu_stall_to_panic, -- 2.25.1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sysctl: Merge adjacent CONFIG_TREE_RCU blocks 2022-05-17 15:07 [PATCH] sysctl: Merge adjacent CONFIG_TREE_RCU blocks Geert Uytterhoeven @ 2022-05-17 15:57 ` Paul E. McKenney 2022-05-19 3:25 ` Luis Chamberlain 0 siblings, 1 reply; 5+ messages in thread From: Paul E. McKenney @ 2022-05-17 15:57 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Luis Chamberlain, Kees Cook, Iurii Zaikin, linux-fsdevel, linux-kernel On Tue, May 17, 2022 at 05:07:31PM +0200, Geert Uytterhoeven wrote: > There are two adjacent sysctl entries protected by the same > CONFIG_TREE_RCU config symbol. Merge them into a single block to > improve readability. > > Use the more common "#ifdef" form while at it. > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> If you would like me to take this, please let me know. (The default would be not the upcoming merge window, but the one after that.) If you would rather send it via some other path: Reviewed-by: Paul E. McKenney <paulmck@kernel.org> > --- > kernel/sysctl.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/kernel/sysctl.c b/kernel/sysctl.c > index 82bcf5e3009fa377..597069da18148f42 100644 > --- a/kernel/sysctl.c > +++ b/kernel/sysctl.c > @@ -2227,7 +2227,7 @@ static struct ctl_table kern_table[] = { > .extra1 = SYSCTL_ZERO, > .extra2 = SYSCTL_ONE, > }, > -#if defined(CONFIG_TREE_RCU) > +#ifdef CONFIG_TREE_RCU > { > .procname = "panic_on_rcu_stall", > .data = &sysctl_panic_on_rcu_stall, > @@ -2237,8 +2237,6 @@ static struct ctl_table kern_table[] = { > .extra1 = SYSCTL_ZERO, > .extra2 = SYSCTL_ONE, > }, > -#endif > -#if defined(CONFIG_TREE_RCU) > { > .procname = "max_rcu_stall_to_panic", > .data = &sysctl_max_rcu_stall_to_panic, > -- > 2.25.1 > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sysctl: Merge adjacent CONFIG_TREE_RCU blocks 2022-05-17 15:57 ` Paul E. McKenney @ 2022-05-19 3:25 ` Luis Chamberlain 2022-05-19 3:57 ` Paul E. McKenney 0 siblings, 1 reply; 5+ messages in thread From: Luis Chamberlain @ 2022-05-19 3:25 UTC (permalink / raw) To: Paul E. McKenney Cc: Geert Uytterhoeven, Kees Cook, Iurii Zaikin, linux-fsdevel, linux-kernel On Tue, May 17, 2022 at 08:57:37AM -0700, Paul E. McKenney wrote: > On Tue, May 17, 2022 at 05:07:31PM +0200, Geert Uytterhoeven wrote: > > There are two adjacent sysctl entries protected by the same > > CONFIG_TREE_RCU config symbol. Merge them into a single block to > > improve readability. > > > > Use the more common "#ifdef" form while at it. > > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> > > If you would like me to take this, please let me know. (The default > would be not the upcoming merge window, but the one after that.) > > If you would rather send it via some other path: > > Reviewed-by: Paul E. McKenney <paulmck@kernel.org> The one that that occurs to me is that while at it, Geert, can you also just then follow up with a patch 2/2 which then moves the sysctl out to the respective RCU code. If you look at linux-nxt kernel/sysctl.c is getting modified heavily with time to avoid stuffing everyone's sysctls there because this creates merge conflicts, make the file hard to read, and we have ways to split this. This work started about 2 kernel releases ago and is ongoing, it may take 3-4 more before kernel/sysctl.c stop being a kitchen sink of everyone's syctls. Paul, I've been collecting these modifications in a sysctl-next tree to avoid merge conflicts, and I try to not do to much per kernel release. If you like I can take this in for that tree as well, but as you noted, this would be for the next release, not the current one which we'll soon enter the merge window for. Let me know! Luis > > > --- > > kernel/sysctl.c | 4 +--- > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > diff --git a/kernel/sysctl.c b/kernel/sysctl.c > > index 82bcf5e3009fa377..597069da18148f42 100644 > > --- a/kernel/sysctl.c > > +++ b/kernel/sysctl.c > > @@ -2227,7 +2227,7 @@ static struct ctl_table kern_table[] = { > > .extra1 = SYSCTL_ZERO, > > .extra2 = SYSCTL_ONE, > > }, > > -#if defined(CONFIG_TREE_RCU) > > +#ifdef CONFIG_TREE_RCU > > { > > .procname = "panic_on_rcu_stall", > > .data = &sysctl_panic_on_rcu_stall, > > @@ -2237,8 +2237,6 @@ static struct ctl_table kern_table[] = { > > .extra1 = SYSCTL_ZERO, > > .extra2 = SYSCTL_ONE, > > }, > > -#endif > > -#if defined(CONFIG_TREE_RCU) > > { > > .procname = "max_rcu_stall_to_panic", > > .data = &sysctl_max_rcu_stall_to_panic, > > -- > > 2.25.1 > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sysctl: Merge adjacent CONFIG_TREE_RCU blocks 2022-05-19 3:25 ` Luis Chamberlain @ 2022-05-19 3:57 ` Paul E. McKenney 2022-06-09 13:58 ` Luis Chamberlain 0 siblings, 1 reply; 5+ messages in thread From: Paul E. McKenney @ 2022-05-19 3:57 UTC (permalink / raw) To: Luis Chamberlain Cc: Geert Uytterhoeven, Kees Cook, Iurii Zaikin, linux-fsdevel, linux-kernel On Wed, May 18, 2022 at 08:25:41PM -0700, Luis Chamberlain wrote: > On Tue, May 17, 2022 at 08:57:37AM -0700, Paul E. McKenney wrote: > > On Tue, May 17, 2022 at 05:07:31PM +0200, Geert Uytterhoeven wrote: > > > There are two adjacent sysctl entries protected by the same > > > CONFIG_TREE_RCU config symbol. Merge them into a single block to > > > improve readability. > > > > > > Use the more common "#ifdef" form while at it. > > > > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> > > > > If you would like me to take this, please let me know. (The default > > would be not the upcoming merge window, but the one after that.) > > > > If you would rather send it via some other path: > > > > Reviewed-by: Paul E. McKenney <paulmck@kernel.org> > > The one that that occurs to me is that while at it, Geert, > can you also just then follow up with a patch 2/2 which then > moves the sysctl out to the respective RCU code. If you look > at linux-nxt kernel/sysctl.c is getting modified heavily with > time to avoid stuffing everyone's sysctls there because this > creates merge conflicts, make the file hard to read, and we > have ways to split this. > > This work started about 2 kernel releases ago and is ongoing, > it may take 3-4 more before kernel/sysctl.c stop being a kitchen > sink of everyone's syctls. > > Paul, I've been collecting these modifications in a sysctl-next > tree to avoid merge conflicts, and I try to not do to much per > kernel release. If you like I can take this in for that tree > as well, but as you noted, this would be for the next release, > not the current one which we'll soon enter the merge window for. > > Let me know! Please do take it! Thanx, Paul > Luis > > > > > --- > > > kernel/sysctl.c | 4 +--- > > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > > > diff --git a/kernel/sysctl.c b/kernel/sysctl.c > > > index 82bcf5e3009fa377..597069da18148f42 100644 > > > --- a/kernel/sysctl.c > > > +++ b/kernel/sysctl.c > > > @@ -2227,7 +2227,7 @@ static struct ctl_table kern_table[] = { > > > .extra1 = SYSCTL_ZERO, > > > .extra2 = SYSCTL_ONE, > > > }, > > > -#if defined(CONFIG_TREE_RCU) > > > +#ifdef CONFIG_TREE_RCU > > > { > > > .procname = "panic_on_rcu_stall", > > > .data = &sysctl_panic_on_rcu_stall, > > > @@ -2237,8 +2237,6 @@ static struct ctl_table kern_table[] = { > > > .extra1 = SYSCTL_ZERO, > > > .extra2 = SYSCTL_ONE, > > > }, > > > -#endif > > > -#if defined(CONFIG_TREE_RCU) > > > { > > > .procname = "max_rcu_stall_to_panic", > > > .data = &sysctl_max_rcu_stall_to_panic, > > > -- > > > 2.25.1 > > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sysctl: Merge adjacent CONFIG_TREE_RCU blocks 2022-05-19 3:57 ` Paul E. McKenney @ 2022-06-09 13:58 ` Luis Chamberlain 0 siblings, 0 replies; 5+ messages in thread From: Luis Chamberlain @ 2022-06-09 13:58 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Paul E. McKenney, Kees Cook, Iurii Zaikin, linux-fsdevel, linux-kernel On Wed, May 18, 2022 at 08:57:20PM -0700, Paul E. McKenney wrote: > On Wed, May 18, 2022 at 08:25:41PM -0700, Luis Chamberlain wrote: > > On Tue, May 17, 2022 at 08:57:37AM -0700, Paul E. McKenney wrote: > > > On Tue, May 17, 2022 at 05:07:31PM +0200, Geert Uytterhoeven wrote: > > > > There are two adjacent sysctl entries protected by the same > > > > CONFIG_TREE_RCU config symbol. Merge them into a single block to > > > > improve readability. > > > > > > > > Use the more common "#ifdef" form while at it. > > > > > > > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> > > > > > > If you would like me to take this, please let me know. (The default > > > would be not the upcoming merge window, but the one after that.) > > > > > > If you would rather send it via some other path: > > > > > > Reviewed-by: Paul E. McKenney <paulmck@kernel.org> > > > > The one that that occurs to me is that while at it, Geert, > > can you also just then follow up with a patch 2/2 which then > > moves the sysctl out to the respective RCU code. If you look > > at linux-nxt kernel/sysctl.c is getting modified heavily with > > time to avoid stuffing everyone's sysctls there because this > > creates merge conflicts, make the file hard to read, and we > > have ways to split this. > > > > This work started about 2 kernel releases ago and is ongoing, > > it may take 3-4 more before kernel/sysctl.c stop being a kitchen > > sink of everyone's syctls. > > > > Paul, I've been collecting these modifications in a sysctl-next > > tree to avoid merge conflicts, and I try to not do to much per > > kernel release. If you like I can take this in for that tree > > as well, but as you noted, this would be for the next release, > > not the current one which we'll soon enter the merge window for. > > > > Let me know! > > Please do take it! Geert, I queued this up onto sysctl-next, but would hope you *might* be inclined to move the sysctls out as outlined above to help with the kitchen sink on kernel/sysctl.c. Luis ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-06-09 13:59 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-05-17 15:07 [PATCH] sysctl: Merge adjacent CONFIG_TREE_RCU blocks Geert Uytterhoeven 2022-05-17 15:57 ` Paul E. McKenney 2022-05-19 3:25 ` Luis Chamberlain 2022-05-19 3:57 ` Paul E. McKenney 2022-06-09 13:58 ` Luis Chamberlain
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®