Re: [PATCH RFC v1 2/2] rcuperf: Add kfree_rcu performance Tests
From: Paul E. McKenney
Date: Sun Aug 11 2019 - 19:42:23 EST
On Sat, Aug 10, 2019 at 10:01:54PM -0400, Joel Fernandes wrote:
> On Tue, Aug 06, 2019 at 05:29:15PM -0700, Paul E. McKenney wrote:
> > On Tue, Aug 06, 2019 at 05:20:41PM -0400, Joel Fernandes (Google) wrote:
[ . . . ]
> > It is really easy to confuse "l" and "1" in some fonts, so please use
> > a different name. (From the "showing my age" department: On typical
> > 1970s typewriters, there was no numeral "1" -- you typed the letter
> > "l" instead, thus anticipating at least the first digit of "1337".)
>
> Change l to loops ;). I did see typewriters around in my childhood, I thought
> they were pretty odd machines :-D. I am sure my daughter will think the same
> about land-line phones :-D
Given your daughter's life expectancy, there will likely be a great many
ca-2019 artifacts that will eventually seem quite odd to her. ;-)
[ . . . ]
> > > +/*
> > > + * shutdown kthread. Just waits to be awakened, then shuts down system.
> > > + */
> > > +static int
> > > +kfree_perf_shutdown(void *arg)
> > > +{
> > > + do {
> > > + wait_event(shutdown_wq,
> > > + atomic_read(&n_kfree_perf_thread_ended) >=
> > > + kfree_nrealthreads);
> > > + } while (atomic_read(&n_kfree_perf_thread_ended) < kfree_nrealthreads);
> > > +
> > > + smp_mb(); /* Wake before output. */
> > > +
> > > + kfree_perf_cleanup();
> > > + kernel_power_off();
> > > + return -EINVAL;
> > > +}
> >
> > Is there some way to avoid (almost) duplicating rcu_perf_shutdown()?
>
> At the moment, I don't see a good way to do this without passing in function
> pointers or using macros which I think would look uglier than the above
> addition. Sorry.
No problem, just something to keep in mind.
Thanx, Paul