aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-kcopyd.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2021-06-15 14:17:35 -0400
committerMike Snitzer <snitzer@redhat.com>2021-06-15 15:42:03 -0400
commit293128b1ef5ae2cfa7403d54e183fe689ed5d303 (patch)
treedd349a4d33751ae24bf01896197e05a72ec2ea49 /drivers/md/dm-kcopyd.c
parentdm writecache: use list_move instead of list_del/list_add in writecache_writeback() (diff)
downloadlinux-dev-293128b1ef5ae2cfa7403d54e183fe689ed5d303.tar.xz
linux-dev-293128b1ef5ae2cfa7403d54e183fe689ed5d303.zip
dm writecache: have ssd writeback wait if the kcopyd workqueue is busy
Make dm-writecache wait if the kcopyd workqueue is busy (as will happen if waiting for page allocation or inside submit_bio). This change improves performance of "mkfs.ext2" by approximately 20% on one testbed. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-kcopyd.c')
-rw-r--r--drivers/md/dm-kcopyd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/dm-kcopyd.c b/drivers/md/dm-kcopyd.c
index e50625ce74ec..37b03ab7e5c9 100644
--- a/drivers/md/dm-kcopyd.c
+++ b/drivers/md/dm-kcopyd.c
@@ -980,3 +980,9 @@ void dm_kcopyd_client_destroy(struct dm_kcopyd_client *kc)
kfree(kc);
}
EXPORT_SYMBOL(dm_kcopyd_client_destroy);
+
+void dm_kcopyd_client_flush(struct dm_kcopyd_client *kc)
+{
+ flush_workqueue(kc->kcopyd_wq);
+}
+EXPORT_SYMBOL(dm_kcopyd_client_flush);