diff options
| author | Yu Kuai <yukuai@fygo.io> | 2026-06-08 11:42:49 +0800 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-06-24 06:42:31 -0600 |
| commit | 3ca4f4e3ae811d414076a491cbf0dfcdae0dc01e (patch) | |
| tree | 51875e33d3a3952fa54bd5aac3b37216afe2a1db /block | |
| parent | f928145cbcb52544203808f159461d0a25543df7 (diff) | |
| download | ath-3ca4f4e3ae811d414076a491cbf0dfcdae0dc01e.tar.gz | |
block, bfq: don't grab queue_lock to initialize bfq
The request_queue is frozen and quiesced while the elevator init_sched()
method runs, so queue_lock is not needed for BFQ cgroup initialization.
Signed-off-by: Yu Kuai <yukuai@fygo.io>
Link: https://patch.msgid.link/1965073ea20f33114a8d903816b986e483b9bb34.1780621988.git.yukuai@fygo.io
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
| -rw-r--r-- | block/bfq-iosched.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index eec9be62061bd..0f75301b3115f 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -7204,10 +7204,7 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_queue *eq) return -ENOMEM; eq->elevator_data = bfqd; - - spin_lock_irq(&q->queue_lock); q->elevator = eq; - spin_unlock_irq(&q->queue_lock); /* * Our fallback bfqq if bfq_find_alloc_queue() runs into OOM issues. @@ -7240,7 +7237,6 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_queue *eq) * If the disk supports multiple actuators, copy independent * access ranges from the request queue structure. */ - spin_lock_irq(&q->queue_lock); if (ia_ranges) { /* * Check if the disk ia_ranges size exceeds the current bfq @@ -7266,7 +7262,6 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_queue *eq) bfqd->sector[0] = 0; bfqd->nr_sectors[0] = get_capacity(q->disk); } - spin_unlock_irq(&q->queue_lock); INIT_LIST_HEAD(&bfqd->dispatch); |
