[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1705242043000.2283@nanos>
Date: Wed, 24 May 2017 20:47:00 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
cc: LKML <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Sebastian Siewior <bigeasy@...utronix.de>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Masami Hiramatsu <mhiramat@...nel.org>
Subject: Re: [patch V3 23/32] perf/tracing/cpuhotplug: Fix locking order
On Wed, 24 May 2017, Paul E. McKenney wrote:
> > @@ -8920,7 +8912,7 @@ perf_event_mux_interval_ms_store(struct
> > pmu->hrtimer_interval_ms = timer;
> >
> > /* update all cpuctx for this PMU */
> > - get_online_cpus();
> > + cpus_read_lock();
>
> OK, I'll bite...
>
> Why is this piece using cpus_read_lock() instead of pmus_lock?
>
> My guess is for the benefit of the cpu_function_call() below, but if
> the code instead cycled through the perf_online_mask, wouldn't any
> CPU selected be guaranteed to be online?
Indeed.
> Or is there some reason that it would be necessary to specially handle
> CPUs that perf does not consider to be active, but that are still at
> least partway online?
I have to delegate that question to Peter :)
Thanks,
tglx
Powered by blists - more mailing lists