Re: [RFC PATCH 3/8] perf: Init/fini PMU specific data

From: Andi Kleen
Date: Mon Dec 02 2019 - 14:15:24 EST


On Mon, Dec 02, 2019 at 05:21:52PM +0100, Peter Zijlstra wrote:
> On Mon, Dec 02, 2019 at 06:59:57AM -0800, Andi Kleen wrote:
> > >
> > > This is atricous crap. Also it is completely broken for -RT.
> >
> > Well can you please suggest how you would implement it instead?
>
> I don't think that is on me; at best I get to explain why it is

Normally code review is expected to be constructive.

> completely unacceptible to have O(nr_tasks) and allocations under a
> raw_spinlock_t, but I was thinking you'd already know that.

Ok if that's the only problem then a lock breaker + retry
if rescheduling is needed + some limit against live lock
should be sufficient.

-Andi