mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-25 00:52:45 -04:00
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>
This commit is contained in:
committed by
Mike Snitzer
parent
8c77f1cb84
commit
293128b1ef
@@ -1812,6 +1812,11 @@ static void writecache_writeback(struct work_struct *work)
|
||||
struct writeback_list wbl;
|
||||
unsigned long n_walked;
|
||||
|
||||
if (!WC_MODE_PMEM(wc)) {
|
||||
/* Wait for any active kcopyd work on behalf of ssd writeback */
|
||||
dm_kcopyd_client_flush(wc->dm_kcopyd);
|
||||
}
|
||||
|
||||
wc_lock(wc);
|
||||
restart:
|
||||
if (writecache_has_error(wc)) {
|
||||
|
||||
Reference in New Issue
Block a user