block: make kblockd_workqueue smarter
authorTejun Heo <tj@kernel.org>
Mon, 3 Jan 2011 14:01:47 +0000 (15:01 +0100)
committerJens Axboe <jaxboe@fusionio.com>
Mon, 3 Jan 2011 14:01:47 +0000 (15:01 +0100)
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>
block/blk-core.c

index 151070541e2176a44439cc2e399762b58bbe39a9..3689319a59749a709eaaafd8fc89725cebe10cfd 100644 (file)
@@ -2606,7 +2606,9 @@ int __init blk_dev_init(void)
        BUILD_BUG_ON(__REQ_NR_BITS > 8 *
                        sizeof(((struct request *)0)->cmd_flags));
 
-       kblockd_workqueue = create_workqueue("kblockd");
+       /* used for unplugging and affects IO latency/throughput - HIGHPRI */
+       kblockd_workqueue = alloc_workqueue("kblockd",
+                                           WQ_MEM_RECLAIM | WQ_HIGHPRI, 0);
        if (!kblockd_workqueue)
                panic("Failed to create kblockd\n");
 
This page took 0.029683 seconds and 5 git commands to generate.