Re: [PATCH RFC v4 1/3] page_pool: fix timing for checking and disabling napi_local

From: Jakub Kicinski
Date: Wed Dec 04 2024 - 20:28:55 EST


On Wed, 4 Dec 2024 19:01:14 +0800 Yunsheng Lin wrote:
> > I don't think this is in the right place.
> > Why not inside page_pool_disable_direct_recycling() ?
>
> It is in page_pool_destroy() mostly because:
> 1. Only call synchronize_rcu() when there is inflight pages, which should
> be an unlikely case, and synchronize_rcu() might need to be called at
> least for the case of pool->p.napi not being NULL if it is called inside
> page_pool_disable_direct_recycling().

Right, my point was that page_pool_disable_direct_recycling()
is an exported function, its callers also need to be protected.