* [PATCH 2/2] kernel/rcu/rcutorture.c: use macro to define module parameter
@ 2014-04-16 20:47 Pranith Kumar
2014-04-16 21:14 ` Paul E. McKenney
0 siblings, 1 reply; 4+ messages in thread
From: Pranith Kumar @ 2014-04-16 20:47 UTC (permalink / raw)
To: paulmck; +Cc: linux-kernel
use the defined macro for module parameter definition
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
kernel/rcu/rcutorture.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index bd30bc6..1a0298c 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -143,9 +143,8 @@ static struct list_head rcu_torture_removed;
#else
#define RCUTORTURE_RUNNABLE_INIT 0
#endif
-int rcutorture_runnable = RCUTORTURE_RUNNABLE_INIT;
-module_param(rcutorture_runnable, int, 0444);
-MODULE_PARM_DESC(rcutorture_runnable, "Start rcutorture at boot");
+torture_param(int, rcutorture_runnable, RCUTORTURE_RUNNABLE_INIT,
+ "Start rcutorture at boot");
#if defined(CONFIG_RCU_BOOST) && !defined(CONFIG_HOTPLUG_CPU)
#define rcu_can_boost() 1
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] kernel/rcu/rcutorture.c: use macro to define module parameter
2014-04-16 20:47 [PATCH 2/2] kernel/rcu/rcutorture.c: use macro to define module parameter Pranith Kumar
@ 2014-04-16 21:14 ` Paul E. McKenney
2014-04-16 23:10 ` Pranith Kumar
0 siblings, 1 reply; 4+ messages in thread
From: Paul E. McKenney @ 2014-04-16 21:14 UTC (permalink / raw)
To: Pranith Kumar; +Cc: linux-kernel
On Wed, Apr 16, 2014 at 04:47:39PM -0400, Pranith Kumar wrote:
> use the defined macro for module parameter definition
>
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
This fails for me. The problem is that the defined macro makes everything
static, and rcutorture_runnable is used in kernel/sysctl.c. :-/
In theory, it would be possible to make torture_param() take "static"
as a parameter, but this adds more characters than it removes.
Thanx, Paul
> ---
> kernel/rcu/rcutorture.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
> index bd30bc6..1a0298c 100644
> --- a/kernel/rcu/rcutorture.c
> +++ b/kernel/rcu/rcutorture.c
> @@ -143,9 +143,8 @@ static struct list_head rcu_torture_removed;
> #else
> #define RCUTORTURE_RUNNABLE_INIT 0
> #endif
> -int rcutorture_runnable = RCUTORTURE_RUNNABLE_INIT;
> -module_param(rcutorture_runnable, int, 0444);
> -MODULE_PARM_DESC(rcutorture_runnable, "Start rcutorture at boot");
> +torture_param(int, rcutorture_runnable, RCUTORTURE_RUNNABLE_INIT,
> + "Start rcutorture at boot");
>
> #if defined(CONFIG_RCU_BOOST) && !defined(CONFIG_HOTPLUG_CPU)
> #define rcu_can_boost() 1
> --
> 1.7.9.5
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] kernel/rcu/rcutorture.c: use macro to define module parameter
2014-04-16 21:14 ` Paul E. McKenney
@ 2014-04-16 23:10 ` Pranith Kumar
2014-04-16 23:23 ` Paul E. McKenney
0 siblings, 1 reply; 4+ messages in thread
From: Pranith Kumar @ 2014-04-16 23:10 UTC (permalink / raw)
To: Paul McKenney; +Cc: LKML
On Wed, Apr 16, 2014 at 5:14 PM, Paul E. McKenney
<paulmck@linux.vnet.ibm.com> wrote:
>
> This fails for me. The problem is that the defined macro makes everything
> static, and rcutorture_runnable is used in kernel/sysctl.c. :-/
>
> In theory, it would be possible to make torture_param() take "static"
> as a parameter, but this adds more characters than it removes.
>
Oh, I just tried building it as a module and it worked. In the future
I will run this both as inbuilt and as a module before sending any
patches.
Sorry for the noise!
--
Pranith
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] kernel/rcu/rcutorture.c: use macro to define module parameter
2014-04-16 23:10 ` Pranith Kumar
@ 2014-04-16 23:23 ` Paul E. McKenney
0 siblings, 0 replies; 4+ messages in thread
From: Paul E. McKenney @ 2014-04-16 23:23 UTC (permalink / raw)
To: Pranith Kumar; +Cc: LKML
On Wed, Apr 16, 2014 at 07:10:41PM -0400, Pranith Kumar wrote:
> On Wed, Apr 16, 2014 at 5:14 PM, Paul E. McKenney
> <paulmck@linux.vnet.ibm.com> wrote:
> >
> > This fails for me. The problem is that the defined macro makes everything
> > static, and rcutorture_runnable is used in kernel/sysctl.c. :-/
> >
> > In theory, it would be possible to make torture_param() take "static"
> > as a parameter, but this adds more characters than it removes.
> >
>
> Oh, I just tried building it as a module and it worked. In the future
> I will run this both as inbuilt and as a module before sending any
> patches.
>
> Sorry for the noise!
This is not noise! I do intend to use it as a module in the future, so
it is helpful that you found and fixed the other bugs. I really cannot
complain about one bad patch out of several useful fixes! So please
do keep trying things and looking at things in RCU. ;-)
Thanx, Paul
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-04-16 23:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-16 20:47 [PATCH 2/2] kernel/rcu/rcutorture.c: use macro to define module parameter Pranith Kumar
2014-04-16 21:14 ` Paul E. McKenney
2014-04-16 23:10 ` Pranith Kumar
2014-04-16 23:23 ` Paul E. McKenney
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.