diff options
| author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2025-09-04 17:25:23 +0300 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2025-09-04 20:28:33 +0300 |
| commit | ad7c7f4b9c6c2950778e5bd305392a333de73912 (patch) | |
| tree | dcd65102da77a7460dbf8e328f048eda467c6997 /scripts/lib/kdoc/kdoc_files.py | |
| parent | cda2b2d647f7e467e53655b56ff430732fb1fa17 (diff) | |
| download | linux-ad7c7f4b9c6c2950778e5bd305392a333de73912.tar.xz | |
workqueue: Provide a handshake for canceling BH workers
While a BH work item is canceled, the core code spins until it
determines that the item completed. On PREEMPT_RT the spinning relies on
a lock in local_bh_disable() to avoid a live lock if the canceling
thread has higher priority than the BH-worker and preempts it. This lock
ensures that the BH-worker makes progress by PI-boosting it.
This lock in local_bh_disable() is a central per-CPU BKL and about to be
removed.
To provide the required synchronisation add a per pool lock. The lock is
acquired by the bh_worker at the begin while the individual callbacks
are invoked. To enforce progress in case of interruption, __flush_work()
needs to acquire the lock.
This will flush all BH-work items assigned to that pool.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions
