mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 02:24:24 +02:00
loop: release the lo_work_lock before queue_work
queue_work could spin on wq->cpu_pwq->pool->lock which could lead to concurrent loop_process_work failed on lo_work_lock contention and increase the request latency. Remove this combination by moving the lock release ahead of queue_work. Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com> Link: https://lore.kernel.org/r/20250207091942.3966756-1-zhaoyang.huang@unisoc.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
1ebd4a3c09
commit
3bee991f2b
|
|
@ -894,8 +894,8 @@ static void loop_queue_work(struct loop_device *lo, struct loop_cmd *cmd)
|
|||
cmd_list = &lo->rootcg_cmd_list;
|
||||
}
|
||||
list_add_tail(&cmd->list_entry, cmd_list);
|
||||
queue_work(lo->workqueue, work);
|
||||
spin_unlock_irq(&lo->lo_work_lock);
|
||||
queue_work(lo->workqueue, work);
|
||||
}
|
||||
|
||||
static void loop_set_timer(struct loop_device *lo)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user