Re: [PATCH 3/3] lib/percpu-refcount: drain ->release() in perpcu_ref_exit()
From: Tejun Heo
Date: Thu Dec 15 2022 - 11:54:36 EST
On Wed, Dec 14, 2022 at 10:51:01AM +0800, Ming Lei wrote:
> The pattern of wait_event(percpu_ref_is_zero()) has been used in several
> kernel components, and this way actually has the following risk:
I'd much rather see those components updated to wait for notification from
->release rather than doing this or update percpu_ref_is_zero() to wait for
->release() to finish.
Thanks.
--
tejun