History

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.

Yu Kuai committed 5 months ago

Commit 3ca4f4e1 parent f9281451 file · +0 −5Browse files

Unified · Split

block/bfq-iosched.c+0−5
@@ -7204,10 +7204,7 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_queue *eq) · 7203 unmodified lines
72047204 return -ENOMEM;
72057205
72067206 eq->elevator_data = bfqd;
7207−
7208− spin_lock_irq(&q->queue_lock);
72097207 q->elevator = eq;
7210− spin_unlock_irq(&q->queue_lock);
72117208
72127209 /*
72137210 * 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) · 26 unmodified lines
72407237 * If the disk supports multiple actuators, copy independent
72417238 * access ranges from the request queue structure.
72427239 */
7243− spin_lock_irq(&q->queue_lock);
72447240 if (ia_ranges) {
72457241 /*
72467242 * 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) · 19 unmodified lines
72667262 bfqd->sector[0] = 0;
72677263 bfqd->nr_sectors[0] = get_capacity(q->disk);
72687264 }
7269− spin_unlock_irq(&q->queue_lock);
72707265
72717266 INIT_LIST_HEAD(&bfqd->dispatch);
72727267

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t