Re: [RFC PATCH 2/8] perf: Helpers for alloc/init/fini PMU specific data

From: Peter Zijlstra
Date: Wed Dec 04 2019 - 07:37:11 EST


On Mon, Dec 02, 2019 at 03:35:00PM -0500, Liang, Kan wrote:

> Could you please give me an example?

There's a ton of refcounting in perf, none of it follows this pattern.

> I think we do need something to protect the refcount. Are you suggesting
> atomic_*?

refcount_t comes to mind.