Skip to content

Commit 89b90be

Browse files
htejunJens Axboe
authored andcommitted
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>
1 parent 27667c9 commit 89b90be

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎block/blk-core.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2606,7 +2606,9 @@ int __init blk_dev_init(void)
26062606
BUILD_BUG_ON(__REQ_NR_BITS > 8 *
26072607
sizeof(((struct request *)0)->cmd_flags));
26082608

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);
26102612
if (!kblockd_workqueue)
26112613
panic("Failed to create kblockd\n");
26122614

0 commit comments

Comments
 (0)