[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180523213553.7a0ffd6d@gandalf.local.home>
Date: Wed, 23 May 2018 21:35:53 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Joel Fernandes <joel@...lfernandes.org>
Cc: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Joel Fernandes <joelaf@...gle.com>,
linux-kernel@...r.kernel.org, Peter Zilstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Boqun Feng <boqun.feng@...il.com>, byungchul.park@....com,
kernel-team@...roid.com, Josh Triplett <josh@...htriplett.org>,
Lai Jiangshan <jiangshanlai@...il.com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
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@...lfernandes.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
Powered by blists - more mailing lists