]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dm: improve kcopyd latency
authorMikulas Patocka <mpatocka@redhat.com>
Tue, 25 May 2021 19:53:32 +0000 (15:53 -0400)
committerMike Snitzer <snitzer@redhat.com>
Tue, 1 Jun 2021 21:57:27 +0000 (17:57 -0400)
commit004ba76083d1702e2e18a5dbf1a990df55355666
tree2eb4760e5310117a961b46d905765f892649ecef
parent185f5bf3e2afcfd51e01065b33179d4e3fc20e71
dm: improve kcopyd latency

Introduce DM_KCOPYD_EARLY_CALLBACK flag that targets may set when
calling dm_kcopyd_copy(). When DM_KCOPYD_EARLY_CALLBACK is set the
completion is called from the interrupt context instead of process
context.

This change doesn't increase interrupts, it just handles completion
early without having to finish doing so in process context. Similar
changes were done to improve latency in dm-crypt recently (to avoid
workqueues and complete in interrupt context).

Update both the DM thinp and cache targets to use this flag to reduce
IO latency.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-cache-target.c
drivers/md/dm-kcopyd.c
drivers/md/dm-thin.c
include/linux/dm-kcopyd.h