diff options
author | 2022-07-22 09:38:23 +0000 | |
---|---|---|
committer | 2022-08-04 13:50:40 -0400 | |
commit | 5721d4e5a9cdb148f681a004ae5748890a0e2d90 (patch) | |
tree | f5247abca044ef89ce7fe5a2a887e5edfb4cd68f /include | |
parent | dm bufio: Add DM_BUFIO_CLIENT_NO_SLEEP flag (diff) | |
download | linux-5721d4e5a9cd.tar.gz linux-5721d4e5a9cd.tar.bz2 linux-5721d4e5a9cd.zip |
dm verity: Add optional "try_verify_in_tasklet" feature
Using tasklets for disk verification can reduce IO latency. When there
are accelerated hash instructions it is often better to compute the
hash immediately using a tasklet rather than deferring verification to
a work-queue. This reduces time spent waiting to schedule work-queue
jobs, but requires spending slightly more time in interrupt context.
If the dm-bufio cache does not have the required hashes we fallback to
the work-queue implementation. FEC is only possible using work-queue
because code to support the FEC feature may sleep.
The following shows a speed comparison of random reads on a dm-verity
device. The dm-verity device uses a 1G ramdisk for data and a 1G
ramdisk for hashes. One test was run using tasklets and one test was
run using the existing work-queue solution. Both tests were run when
the dm-bufio cache was hot. The tasklet implementation performs
significantly better since there is no time spent waiting for
work-queue jobs to be scheduled.
READ: bw=181MiB/s (190MB/s), 181MiB/s-181MiB/s (190MB/s-190MB/s),
io=512MiB (537MB), run=2827-2827msec
READ: bw=23.6MiB/s (24.8MB/s), 23.6MiB/s-23.6MiB/s (24.8MB/s-24.8MB/s),
io=512MiB (537MB), run=21688-21688msec
Signed-off-by: Nathan Huckleberry <nhuck@google.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions