]> git.baikalelectronics.ru Git - kernel.git/commit
dm writecache: pause writeback if cache full and origin being written directly
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 25 Jun 2021 19:33:02 +0000 (15:33 -0400)
committerMike Snitzer <snitzer@redhat.com>
Fri, 25 Jun 2021 20:04:01 +0000 (16:04 -0400)
commit62dcd2bdffe2757b0b0d2d0dc2bc1f15d54a3106
tree5330af07d1fdf5a5c2edb48d07fc377b704c532f
parentfaeb9eeff651b199aad3a6cb1471ae1f18e50178
dm writecache: pause writeback if cache full and origin being written directly

Implementation reuses dm_io_tracker, that until now was only used by
dm-cache, to track if any writes were issued directly to the origin
(due to cache being full) within the last second. If so writeback is
paused for a second.

This change improves performance for when the cache is full and IO is
issued directly to the origin device (rather than through the cache).

Depends-on: 8ee9d020f380 ("dm writecache: do direct write if the cache is full")
Suggested-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-writecache.c