Tejun Heo
4fe9852927
rhashtable: Bounce deferred worker kick through irq_work
...
Inserts past 75% load call schedule_work(&ht->run_work) to kick an
async resize. If a caller holds a raw spinlock (e.g. an
insecure_elasticity user), schedule_work() under that lock records
caller_lock -> pool->lock -> pi_lock -> rq->__lock
A cycle forms if any of these locks is acquired in the reverse
direction elsewhere. sched_ext, the only current insecure_elasticity
user, hits this: it holds scx_sched_lock across rhashtable inserts of
sub-schedulers, while scx_bypass() takes rq->__lock -> scx_sched_lock.
Exercising the resize path produces:
Chain exists of:
&pool->lock --> &rq->__lock --> scx_sched_lock
Bounce the kick from the insert paths through irq_work so
schedule_work() runs from hard IRQ context with the caller's lock no
longer held. rht_deferred_worker()'s self-rearm on error stays on
schedule_work(&ht->run_work) - the worker runs in process context with
no caller lock held, and keeping the self-requeue on @run_work lets
cancel_work_sync() in rhashtable_free_and_destroy() drain it.
v3: Keep rht_deferred_worker()'s self-rearm on schedule_work(&run_work).
Routing it through irq_work in v2 broke cancel_work_sync()'s
self-requeue handling - an irq_work queued after irq_work_sync()
returned but while cancel_work_sync() was still waiting could fire
post-teardown.
v2: Bounce unconditionally instead of gating on insecure_elasticity,
as suggested by Herbert.
Signed-off-by: Tejun Heo <tj@kernel.org >
Acked-by: Herbert Xu <herbert@gondor.apana.org.au >
2026-04-20 20:10:50 -10:00
..
2026-04-13 19:03:11 -07:00
2026-04-08 19:38:52 -07:00
2026-04-15 09:20:49 -07:00
2026-04-04 20:41:25 +02:00
2026-04-13 20:10:58 -07:00
2026-04-05 13:53:04 -07:00
2026-04-15 09:20:49 -07:00
2026-04-16 08:01:16 -07:00
2026-04-15 14:15:25 -07:00
2026-04-08 07:51:26 +02:00
2026-03-26 15:22:41 +01:00
2026-04-15 14:37:32 -07:00
2026-04-15 17:15:18 -07:00
2026-04-11 11:53:54 +01:00
2026-04-05 13:53:07 -07:00
2026-04-15 08:32:10 -07:00
2026-04-09 21:40:22 +02:00
2026-03-27 15:32:04 +00:00
2026-04-13 14:56:54 -07:00
2026-04-03 16:53:50 -04:00
2026-04-07 08:22:24 -06:00
2026-04-01 20:03:07 -04:00
2026-04-09 13:28:05 -04:00
2026-04-13 15:51:31 -07:00
2026-04-10 21:22:32 -07:00
2026-04-12 12:37:04 -07:00
2026-04-06 18:37:52 -07:00
2026-04-08 18:09:56 -07:00
2026-04-12 11:33:23 -07:00
2026-03-29 09:56:06 -07:00
2026-03-26 15:03:32 +01:00
2026-04-04 08:10:37 -06:00
2026-04-15 10:54:24 -07:00
2026-04-11 07:58:33 +02:00
2026-04-14 10:53:44 -07:00
2026-03-31 14:41:56 -07:00
2026-04-15 08:37:45 -07:00
2026-04-04 18:40:58 -06:00
2026-04-04 20:55:56 +02:00
2026-04-07 15:32:20 +02:00
2026-04-05 13:53:28 -07:00
2026-04-05 13:53:19 -07:00
2026-04-10 11:25:34 -05:00
2026-03-27 22:19:17 +01:00
2026-04-08 15:27:47 +02:00
2026-04-01 20:54:16 +02:00
2026-04-03 16:48:01 -07:00
2026-04-06 20:21:37 -06:00
2026-03-31 19:15:21 +02:00
2026-04-14 16:48:56 -07:00
2026-03-31 23:42:52 +00:00
2026-04-14 18:36:10 -07:00
2026-04-05 13:53:07 -07:00
2026-04-05 13:53:07 -07:00
2026-04-07 17:38:07 +02:00
2026-04-15 12:59:16 -07:00
2026-03-26 22:00:59 +01:00
2026-04-06 20:21:37 -06:00
2026-04-06 20:21:37 -06:00
2026-04-08 14:23:29 -07:00
2026-04-12 16:46:29 +08:00
2026-04-05 13:53:45 -07:00
2026-04-05 13:53:25 -07:00
2026-04-15 12:59:16 -07:00
2026-04-05 13:53:44 -07:00
2026-03-29 11:21:23 -07:00
2026-04-07 15:36:02 +02:00
2026-04-08 08:55:15 +02:00
2026-04-12 15:20:46 -07:00
2026-04-13 15:09:49 +02:00
2026-03-29 11:21:23 -07:00
2026-04-01 16:03:05 +02:00
2026-04-13 16:22:30 -07:00
2026-04-15 12:59:16 -07:00
2026-04-09 13:18:27 +01:00
2026-03-27 10:18:39 -05:00
2026-04-14 23:03:02 -07:00
2026-04-05 13:53:28 -07:00
2026-04-13 10:10:28 -07:00
2026-04-05 13:53:04 -07:00
2026-04-09 14:36:52 +02:00
2026-04-09 14:36:52 +02:00
2026-04-05 13:53:40 -07:00
2026-04-03 19:39:52 +02:00
2026-04-05 13:53:46 -07:00
2026-04-01 10:19:41 +02:00
2026-04-03 16:53:50 -04:00
2026-04-13 15:42:19 -07:00
2026-04-03 16:53:50 -04:00
2026-04-05 13:52:55 -07:00
2026-04-09 17:14:36 +02:00
2026-04-05 13:53:04 -07:00
2026-04-05 13:53:00 -07:00
2026-04-05 13:53:32 -07:00
2026-04-05 13:53:33 -07:00
2026-04-05 13:53:01 -07:00
2026-03-26 16:13:48 +01:00
2026-04-02 18:03:03 -07:00
2026-04-05 13:53:36 -07:00
2026-04-05 13:53:45 -07:00
2026-04-05 13:53:45 -07:00
2026-04-05 13:53:41 -07:00
2026-04-08 13:18:57 -07:00
2026-04-15 12:59:16 -07:00
2026-04-15 12:59:16 -07:00
2026-03-31 23:42:18 +00:00
2026-03-31 23:42:52 +00:00
2026-03-27 17:01:36 +01:00
2026-04-13 14:56:28 -07:00
2026-04-14 18:36:10 -07:00
2026-03-29 11:21:24 -07:00
2026-03-26 15:18:45 +01:00
2026-03-27 10:56:05 -05:00
2026-04-13 15:51:31 -07:00
2026-03-27 07:35:05 -07:00
2026-04-05 13:53:12 -07:00
2026-04-05 13:53:17 -07:00
2026-04-05 13:53:19 -07:00
2026-04-05 13:53:10 -07:00
2026-04-10 17:27:39 -05:00
2026-04-04 16:14:37 +05:30
2026-04-06 16:55:16 +02:00
2026-04-15 14:41:21 -07:00
2026-04-05 13:53:35 -07:00
2026-04-12 11:33:23 -07:00
2026-04-01 13:33:35 +02:00
2026-03-30 13:57:49 +02:00
2026-03-27 18:52:43 +09:00
2026-03-30 12:02:12 +02:00
2026-03-27 17:14:31 -07:00
2026-04-07 12:24:49 -07:00
2026-03-31 14:41:56 -07:00
2026-04-10 11:46:15 +01:00
2026-04-20 20:10:50 -10:00
2026-04-20 20:10:50 -10:00
2026-03-31 16:47:17 +02:00
2026-04-14 13:33:36 -07:00
2026-04-13 15:42:19 -07:00
2026-03-31 07:04:00 -06:00
2026-03-31 09:48:42 +02:00
2026-04-12 10:54:31 -07:00
2026-03-30 15:48:13 -04:00
2026-03-30 15:48:13 -04:00
2026-03-27 20:57:38 -07:00
2026-04-05 13:53:06 -07:00
2026-04-13 19:03:11 -07:00
2026-04-08 12:30:31 +02:00
2026-04-01 17:13:35 +02:00
2026-03-31 16:01:13 -07:00
2026-04-05 13:53:08 -07:00
2026-04-13 08:39:51 -07:00
2026-04-05 13:53:44 -07:00
2026-04-02 09:43:26 +02:00
2026-04-05 13:53:41 -07:00
2026-04-04 00:47:50 +02:00
2026-03-30 16:43:24 -06:00
2026-04-05 13:52:58 -07:00
2026-04-05 13:53:04 -07:00
2026-04-04 00:45:14 +02:00
2026-04-01 10:24:18 -10:00
2026-04-05 13:53:07 -07:00