rbd: rbd workqueues need a resque worker
authorIlya Dryomov <idryomov@redhat.com>
Fri, 10 Oct 2014 14:36:07 +0000 (18:36 +0400)
committerSage Weil <sage@redhat.com>
Tue, 14 Oct 2014 19:57:05 +0000 (12:57 -0700)
Need to use WQ_MEM_RECLAIM for our workqueues to prevent I/O lockups
under memory pressure - we sit on the memory reclaim path.

Cc: stable@vger.kernel.org # 3.17, needs backporting for 3.16
Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
Tested-by: Micha Krause <micha@krausam.de>
Reviewed-by: Sage Weil <sage@redhat.com>
drivers/block/rbd.c

index 7712ae65753caeaaf5be57eb32dfdc929c4aed11..0a54c588e433751f39084459193a5da7700d34db 100644 (file)
@@ -5242,7 +5242,8 @@ static int rbd_dev_device_setup(struct rbd_device *rbd_dev)
        set_capacity(rbd_dev->disk, rbd_dev->mapping.size / SECTOR_SIZE);
        set_disk_ro(rbd_dev->disk, rbd_dev->mapping.read_only);
 
-       rbd_dev->rq_wq = alloc_workqueue("%s", 0, 0, rbd_dev->disk->disk_name);
+       rbd_dev->rq_wq = alloc_workqueue("%s", WQ_MEM_RECLAIM, 0,
+                                        rbd_dev->disk->disk_name);
        if (!rbd_dev->rq_wq) {
                ret = -ENOMEM;
                goto err_out_mapping;