Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1633164 > unrolled thread

[PATCH RFC tip/core/rcu] Make SRCU be once again optional

Started by"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
First post2017-04-28 23:20 +0200
Last post2017-04-29 02:20 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH RFC tip/core/rcu] Make SRCU be once again optional "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-28 23:20 +0200
    Re: [PATCH RFC tip/core/rcu] Make SRCU be once again optional Nicolas Pitre <nicolas.pitre@linaro.org> - 2017-04-29 00:00 +0200
      Re: [PATCH RFC tip/core/rcu] Make SRCU be once again optional "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-04-29 02:20 +0200

#1633164 — [PATCH RFC tip/core/rcu] Make SRCU be once again optional

From"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Date2017-04-28 23:20 +0200
Subject[PATCH RFC tip/core/rcu] Make SRCU be once again optional
Message-ID<tBlsZ-4Oz-1@gated-at.bofh.it>
Hello, Nicolas!

Saw the TTY write up LWN and figured I should send this your way.
It should be worth about 2K compared to current -next, which gave
up the 2K compared to v4.10.  So really getting things back to where
they were.

My current plan is to push this into v4.13.

							Thanx, Paul

------------------------------------------------------------------------

commit e01ef0529ed548c1b30206058c2b5eecbbc07998
Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Date:   Fri Apr 28 13:53:04 2017 -0700

    srcu: Make SRCU be once again optional
    
    Commit d160a727c40e ("srcu: Make SRCU be built by default") in response
    to build errors, which were caused by code that included srcu.h
    despite !SRCU.  However, srcutiny.o is almost 2K of code, which is not
    insignificant for those attempting to run the Linux kernel on IoT devices.
    This commit therefore makes SRCU be once again optional, and adjusts
    srcu.h to allow error-free inclusion in !SRCU kernel builds.
    
    Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
    Cc: Nicolas Pitre <nicolas.pitre@linaro.org>

diff --git a/include/linux/srcu.h b/include/linux/srcu.h
index 167ad8831aaf..c0143fe2e39d 100644
--- a/include/linux/srcu.h
+++ b/include/linux/srcu.h
@@ -62,7 +62,7 @@ int init_srcu_struct(struct srcu_struct *sp);
 #include <linux/srcutree.h>
 #elif defined(CONFIG_CLASSIC_SRCU)
 #include <linux/srcuclassic.h>
-#else
+#elif defined(CONFIG_SRCU)
 #error "Unknown SRCU implementation specified to kernel configuration"
 #endif
 
diff --git a/init/Kconfig b/init/Kconfig
index 42a346b0df43..fe72c12e06a5 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -521,7 +521,6 @@ config RCU_EXPERT
 
 config SRCU
 	bool
-	default y
 	help
 	  This option selects the sleepable version of RCU. This version
 	  permits arbitrary sleeping or blocking within RCU read-side critical

[toc] | [next] | [standalone]


#1633175

FromNicolas Pitre <nicolas.pitre@linaro.org>
Date2017-04-29 00:00 +0200
Message-ID<tBm5H-55J-7@gated-at.bofh.it>
In reply to#1633164
On Fri, 28 Apr 2017, Paul E. McKenney wrote:

> Hello, Nicolas!
> 
> Saw the TTY write up LWN and figured I should send this your way.
> It should be worth about 2K compared to current -next, which gave
> up the 2K compared to v4.10.  So really getting things back to where
> they were.
> 
> My current plan is to push this into v4.13.

Excellent!

If every maintainer finds a way to (optionally) reduce the size of the 
code they maintain by 2K then we'll get a much smaller kernel pretty 
soon.

> 
> 							Thanx, Paul
> 
> ------------------------------------------------------------------------
> 
> commit e01ef0529ed548c1b30206058c2b5eecbbc07998
> Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Date:   Fri Apr 28 13:53:04 2017 -0700
> 
>     srcu: Make SRCU be once again optional
>     
>     Commit d160a727c40e ("srcu: Make SRCU be built by default") in response
>     to build errors, which were caused by code that included srcu.h
>     despite !SRCU.  However, srcutiny.o is almost 2K of code, which is not
>     insignificant for those attempting to run the Linux kernel on IoT devices.
>     This commit therefore makes SRCU be once again optional, and adjusts
>     srcu.h to allow error-free inclusion in !SRCU kernel builds.
>     
>     Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
>     Cc: Nicolas Pitre <nicolas.pitre@linaro.org>

Acked-by: Nicolas Pitre <nico@linaro.org>


> 
> diff --git a/include/linux/srcu.h b/include/linux/srcu.h
> index 167ad8831aaf..c0143fe2e39d 100644
> --- a/include/linux/srcu.h
> +++ b/include/linux/srcu.h
> @@ -62,7 +62,7 @@ int init_srcu_struct(struct srcu_struct *sp);
>  #include <linux/srcutree.h>
>  #elif defined(CONFIG_CLASSIC_SRCU)
>  #include <linux/srcuclassic.h>
> -#else
> +#elif defined(CONFIG_SRCU)
>  #error "Unknown SRCU implementation specified to kernel configuration"
>  #endif
>  
> diff --git a/init/Kconfig b/init/Kconfig
> index 42a346b0df43..fe72c12e06a5 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -521,7 +521,6 @@ config RCU_EXPERT
>  
>  config SRCU
>  	bool
> -	default y
>  	help
>  	  This option selects the sleepable version of RCU. This version
>  	  permits arbitrary sleeping or blocking within RCU read-side critical
> 
> 

[toc] | [prev] | [next] | [standalone]


#1633211

From"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Date2017-04-29 02:20 +0200
Message-ID<tBohb-6MR-5@gated-at.bofh.it>
In reply to#1633175
On Fri, Apr 28, 2017 at 05:51:15PM -0400, Nicolas Pitre wrote:
> On Fri, 28 Apr 2017, Paul E. McKenney wrote:
> 
> > Hello, Nicolas!
> > 
> > Saw the TTY write up LWN and figured I should send this your way.
> > It should be worth about 2K compared to current -next, which gave
> > up the 2K compared to v4.10.  So really getting things back to where
> > they were.
> > 
> > My current plan is to push this into v4.13.
> 
> Excellent!
> 
> If every maintainer finds a way to (optionally) reduce the size of the 
> code they maintain by 2K then we'll get a much smaller kernel pretty 
> soon.

I would feel better if it wasn't me who had added the 2K, but then
again, I do look forward to seeing a negative-sized kernel!  ;-)

> > ------------------------------------------------------------------------
> > 
> > commit e01ef0529ed548c1b30206058c2b5eecbbc07998
> > Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> > Date:   Fri Apr 28 13:53:04 2017 -0700
> > 
> >     srcu: Make SRCU be once again optional
> >     
> >     Commit d160a727c40e ("srcu: Make SRCU be built by default") in response
> >     to build errors, which were caused by code that included srcu.h
> >     despite !SRCU.  However, srcutiny.o is almost 2K of code, which is not
> >     insignificant for those attempting to run the Linux kernel on IoT devices.
> >     This commit therefore makes SRCU be once again optional, and adjusts
> >     srcu.h to allow error-free inclusion in !SRCU kernel builds.
> >     
> >     Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> >     Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
> 
> Acked-by: Nicolas Pitre <nico@linaro.org>

Applied, thank you!

							Thanx, Paul

> > diff --git a/include/linux/srcu.h b/include/linux/srcu.h
> > index 167ad8831aaf..c0143fe2e39d 100644
> > --- a/include/linux/srcu.h
> > +++ b/include/linux/srcu.h
> > @@ -62,7 +62,7 @@ int init_srcu_struct(struct srcu_struct *sp);
> >  #include <linux/srcutree.h>
> >  #elif defined(CONFIG_CLASSIC_SRCU)
> >  #include <linux/srcuclassic.h>
> > -#else
> > +#elif defined(CONFIG_SRCU)
> >  #error "Unknown SRCU implementation specified to kernel configuration"
> >  #endif
> >  
> > diff --git a/init/Kconfig b/init/Kconfig
> > index 42a346b0df43..fe72c12e06a5 100644
> > --- a/init/Kconfig
> > +++ b/init/Kconfig
> > @@ -521,7 +521,6 @@ config RCU_EXPERT
> >  
> >  config SRCU
> >  	bool
> > -	default y
> >  	help
> >  	  This option selects the sleepable version of RCU. This version
> >  	  permits arbitrary sleeping or blocking within RCU read-side critical
> > 
> > 
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web