Commit 89b90be2d877a904b1704e4029db65655bfc6282

Authored by Tejun Heo
Committed by Jens Axboe
1 parent 27667c996f

block: make kblockd_workqueue smarter

kblockd is used for unplugging and may affect IO latency and
throughput and the max number of concurrent work items are bound by
the number of block devices.  Make it HIGHPRI workqueue w/ default max
concurrency.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>

Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff

... ... @@ -2606,7 +2606,9 @@
2606 2606 BUILD_BUG_ON(__REQ_NR_BITS > 8 *
2607 2607 sizeof(((struct request *)0)->cmd_flags));
2608 2608  
2609   - kblockd_workqueue = create_workqueue("kblockd");
  2609 + /* used for unplugging and affects IO latency/throughput - HIGHPRI */
  2610 + kblockd_workqueue = alloc_workqueue("kblockd",
  2611 + WQ_MEM_RECLAIM | WQ_HIGHPRI, 0);
2610 2612 if (!kblockd_workqueue)
2611 2613 panic("Failed to create kblockd\n");
2612 2614