On Wed, Jun 03, 2026 at 02:08:25PM +0100, Mykyta Yatsenko wrote: > > For v7 I'm dropping automatic_shrinking, because it adds a risk of > calling schedule_work() on element deletion path (__rhashtable_remove_fast_one()) > when hashtable size drops below 30% of the capacity. Now that expansion uses irq work I think shrinking should switch to that as well. ---8<--- Use irq work for automatic shrinking so that this may be called in NMI context. Signed-off-by: Herbert Xu diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h index ef5230cece36..0693bce6f890 100644 --- a/include/linux/rhashtable.h +++ b/include/linux/rhashtable.h @@ -1117,7 +1117,7 @@ static __always_inline int __rhashtable_remove_fast_one( atomic_dec(&ht->nelems); if (unlikely(ht->p.automatic_shrinking && rht_shrink_below_30(ht, tbl))) - schedule_work(&ht->run_work); + irq_work_queue(&ht->run_irq_work); err = 0; } Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt