Re: [RFC PATCH 1/1] rcu: Use rcu_gp_kthread_wake() to wake up kthreads

From: Paul E. McKenney
Date: Sun Jul 27 2014 - 13:19:48 EST


On Fri, Jul 25, 2014 at 07:29:37PM -0400, Pranith Kumar wrote:
>
> On 07/25/2014 07:15 PM, Paul E. McKenney wrote:
> > On Fri, Jul 25, 2014 at 06:23:41PM -0400, Pranith Kumar wrote:
> >> Here total is the total number of times we enter th function rcu_report_qs_rsp()
> >> and unnecessary is the times we call wake_up() unnecessarily.
> >> case1, 2, 3 are the cases I listed above.
> >>
> >> Note that the frequency has gone way up than before, I am not sure why that is.
> >>
> >> *ALL* the wakeups seem to be unnecessary from that location. And the
> >> main reason is that gp_flags is 0.
> >>
> >> My rcugp file has the following:
> >>
> >> completed=257515 gpnum=257516 age=1 max=1684
> >>
> >> Thoughts?
> > Hard to believe in the rcutorture case. My guess was that rcutorture was
> > doing about 9000 wakeups, 2000 of which were unnecessary. Which would
> > of course still tilt things very much in favor of your patch.
> >
> > I am not surprised in the mostly-idle case, as the RCU grace-period
> > kthread would most likely be the one ending the grace period, which
> > would therefore almost always be a self-wakeup.
> >
> > Any chance of a peek at your debugging code?
>
> Sure, I am also attaching my dmesg output. Hope it helps!

Looks legit. I guess that having even one CPU idle for the duration
of the grace period will cause a self wakeup, so perhaps I should not
have been surprised.

In any case, please summarize the data down to no more than 30 lines of
text and resend your wakeup-elimination patch with this text included
as the change log.

Thanx, Paul

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/