Messages in this thread | | | Date | Tue, 14 Apr 2015 20:19:57 -0700 | Subject | Re: [GIT PULL] RCU changes for v4.1 | From | Linus Torvalds <> |
| |
On Tue, Apr 14, 2015 at 7:55 PM, Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote: > > Does the (currently being tested) patch below fix things up? If not, > please fill me in on the further error of my ways.
Looks ok.
That said, couldn't that last dummy gp_init_delay variable:
> +/* Delay in jiffies for grace-period initialization delays, debug only. */ > +#ifdef CONFIG_RCU_TORTURE_TEST_SLOW_INIT > +static int gp_init_delay = CONFIG_RCU_TORTURE_TEST_SLOW_INIT_DELAY; > module_param(gp_init_delay, int, 0644); > +#else /* #ifdef CONFIG_RCU_TORTURE_TEST_SLOW_INIT */ > +static const int gp_init_delay; > +#endif /* #else #ifdef CONFIG_RCU_TORTURE_TEST_SLOW_INIT */
be just a
#define gp_init_delay 0
for the non-CONFIG_RCU_TORTURE_TEST_SLOW_INIT case, so that the code that then does
+ if (gp_init_delay > 0 && + !(rsp->gpnum % (rcu_num_nodes * PER_RCU_NODE_PERIOD)))
would just trivially compile away.
I guess the compiler *might* see a 'static const int' that is never touched and realize it's always zero, but it's not obvious that will be the case.
Linus
Linus
| |