mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
workqueue: Improve locking rule description for worker fields
* Some worker fields are modified only by the worker itself while holding pool->lock thus making them safe to read from self, IRQ context if the CPU is running the worker or while holding pool->lock. Add 'K' locking rule for them. * worker->sleeping is currently marked "None" which isn't very descriptive. It's used only by the worker itself. Add 'S' locking rule for it. A future patch will depend on the 'K' rule to access worker->current_* from the scheduler ticks. Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
@@ -126,6 +126,12 @@ enum {
|
||||
* cpu or grabbing pool->lock is enough for read access. If
|
||||
* POOL_DISASSOCIATED is set, it's identical to L.
|
||||
*
|
||||
* K: Only modified by worker while holding pool->lock. Can be safely read by
|
||||
* self, while holding pool->lock or from IRQ context if %current is the
|
||||
* kworker.
|
||||
*
|
||||
* S: Only modified by worker self.
|
||||
*
|
||||
* A: wq_pool_attach_mutex protected.
|
||||
*
|
||||
* PL: wq_pool_mutex protected.
|
||||
|
Reference in New Issue
Block a user