summaryrefslogtreecommitdiffstats
path: root/block/blk-throttle.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-throttle.c')
-rw-r--r--block/blk-throttle.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index a665b0950369..d0a23f0bb3ed 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -1243,7 +1243,7 @@ static void throtl_pending_timer_fn(struct timer_list *t)
1243 bool dispatched; 1243 bool dispatched;
1244 int ret; 1244 int ret;
1245 1245
1246 spin_lock_irq(q->queue_lock); 1246 spin_lock_irq(&q->queue_lock);
1247 if (throtl_can_upgrade(td, NULL)) 1247 if (throtl_can_upgrade(td, NULL))
1248 throtl_upgrade_state(td); 1248 throtl_upgrade_state(td);
1249 1249
@@ -1266,9 +1266,9 @@ again:
1266 break; 1266 break;
1267 1267
1268 /* this dispatch windows is still open, relax and repeat */ 1268 /* this dispatch windows is still open, relax and repeat */
1269 spin_unlock_irq(q->queue_lock); 1269 spin_unlock_irq(&q->queue_lock);
1270 cpu_relax(); 1270 cpu_relax();
1271 spin_lock_irq(q->queue_lock); 1271 spin_lock_irq(&q->queue_lock);
1272 } 1272 }
1273 1273
1274 if (!dispatched) 1274 if (!dispatched)
@@ -1290,7 +1290,7 @@ again:
1290 queue_work(kthrotld_workqueue, &td->dispatch_work); 1290 queue_work(kthrotld_workqueue, &td->dispatch_work);
1291 } 1291 }
1292out_unlock: 1292out_unlock:
1293 spin_unlock_irq(q->queue_lock); 1293 spin_unlock_irq(&q->queue_lock);
1294} 1294}
1295 1295
1296/** 1296/**
@@ -1314,11 +1314,11 @@ static void blk_throtl_dispatch_work_fn(struct work_struct *work)
1314 1314
1315 bio_list_init(&bio_list_on_stack); 1315 bio_list_init(&bio_list_on_stack);
1316 1316
1317 spin_lock_irq(q->queue_lock); 1317 spin_lock_irq(&q->queue_lock);
1318 for (rw = READ; rw <= WRITE; rw++) 1318 for (rw = READ; rw <= WRITE; rw++)
1319 while ((bio = throtl_pop_queued(&td_sq->queued[rw], NULL))) 1319 while ((bio = throtl_pop_queued(&td_sq->queued[rw], NULL)))
1320 bio_list_add(&bio_list_on_stack, bio); 1320 bio_list_add(&bio_list_on_stack, bio);
1321 spin_unlock_irq(q->queue_lock); 1321 spin_unlock_irq(&q->queue_lock);
1322 1322
1323 if (!bio_list_empty(&bio_list_on_stack)) { 1323 if (!bio_list_empty(&bio_list_on_stack)) {
1324 blk_start_plug(&plug); 1324 blk_start_plug(&plug);
@@ -2141,7 +2141,7 @@ bool blk_throtl_bio(struct request_queue *q, struct blkcg_gq *blkg,
2141 if (bio_flagged(bio, BIO_THROTTLED) || !tg->has_rules[rw]) 2141 if (bio_flagged(bio, BIO_THROTTLED) || !tg->has_rules[rw])
2142 goto out; 2142 goto out;
2143 2143
2144 spin_lock_irq(q->queue_lock); 2144 spin_lock_irq(&q->queue_lock);
2145 2145
2146 throtl_update_latency_buckets(td); 2146 throtl_update_latency_buckets(td);
2147 2147
@@ -2224,7 +2224,7 @@ again:
2224 } 2224 }
2225 2225
2226out_unlock: 2226out_unlock:
2227 spin_unlock_irq(q->queue_lock); 2227 spin_unlock_irq(&q->queue_lock);
2228out: 2228out:
2229 bio_set_flag(bio, BIO_THROTTLED); 2229 bio_set_flag(bio, BIO_THROTTLED);
2230 2230
@@ -2345,7 +2345,7 @@ static void tg_drain_bios(struct throtl_service_queue *parent_sq)
2345 * Dispatch all currently throttled bios on @q through ->make_request_fn(). 2345 * Dispatch all currently throttled bios on @q through ->make_request_fn().
2346 */ 2346 */
2347void blk_throtl_drain(struct request_queue *q) 2347void blk_throtl_drain(struct request_queue *q)
2348 __releases(q->queue_lock) __acquires(q->queue_lock) 2348 __releases(&q->queue_lock) __acquires(&q->queue_lock)
2349{ 2349{
2350 struct throtl_data *td = q->td; 2350 struct throtl_data *td = q->td;
2351 struct blkcg_gq *blkg; 2351 struct blkcg_gq *blkg;
@@ -2368,7 +2368,7 @@ void blk_throtl_drain(struct request_queue *q)
2368 tg_drain_bios(&td->service_queue); 2368 tg_drain_bios(&td->service_queue);
2369 2369
2370 rcu_read_unlock(); 2370 rcu_read_unlock();
2371 spin_unlock_irq(q->queue_lock); 2371 spin_unlock_irq(&q->queue_lock);
2372 2372
2373 /* all bios now should be in td->service_queue, issue them */ 2373 /* all bios now should be in td->service_queue, issue them */
2374 for (rw = READ; rw <= WRITE; rw++) 2374 for (rw = READ; rw <= WRITE; rw++)
@@ -2376,7 +2376,7 @@ void blk_throtl_drain(struct request_queue *q)
2376 NULL))) 2376 NULL)))
2377 generic_make_request(bio); 2377 generic_make_request(bio);
2378 2378
2379 spin_lock_irq(q->queue_lock); 2379 spin_lock_irq(&q->queue_lock);
2380} 2380}
2381 2381
2382int blk_throtl_init(struct request_queue *q) 2382int blk_throtl_init(struct request_queue *q)