Messages in this thread | | | Date | Wed, 23 May 2018 21:35:53 -0400 | From | Steven Rostedt <> | Subject | Re: [PATCH 1/4] rcu: Speed up calling of RCU tasks callbacks |
| |
On Wed, 23 May 2018 17:51:19 -0700 Joel Fernandes <joel@joelfernandes.org> wrote:
> Shouldn't this assignment be done outside the loop? I believe the variable > will be initialized on each iteration. > > A program like this doesn't terminate: > > #include<stdio.h> > > int main() { > for (;;) { > int i = 10; > if (!(i--)) > break; > } > > return 0; > }
Hey, it compiled, booted and tested. SHIP IT! ;-)
But yeah, a little egg on my face for that one. I blame it for the first code I wrote right off of coming back from vacation.
> > Otherwise looks good to me, I would initialize fract to 10 so its consistent > with "HZ/10" in other parts of the code but I'm ok with either number.
I was thinking about that, but for some reason I thought 15. Not sure why. I'm fine with dropping it down to 10. I'll send out a more proper patch tomorrow.
Thanks!
-- Steve
| |