Re: [PATCH] notifier: Make atomic_notifiers use raw_spinlock

From: Peter Zijlstra
Date: Fri Aug 06 2021 - 14:03:19 EST


On Fri, Aug 06, 2021 at 04:07:18PM +0200, Sebastian Andrzej Siewior wrote:
> What do we do with this?
> Do we merge this as-is, add another "robust atomic notifier" using only
> raw_spinlock_t for registration and notification (for only
> cpu_pm_notifier_chain) instead of switching to raw_spinlock_t for all
> atomic notifier in -tree?

Right, so the problem I see with this is that
notifier_chain_{,un}register() are O(n). Hardly something we should be
putting under raw_spin_lock :/