diff options
| author | LongPing Wei <weilongping@oppo.com> | 2025-03-27 10:18:19 +0800 |
|---|---|---|
| committer | Mikulas Patocka <mpatocka@redhat.com> | 2025-03-28 11:32:55 +0100 |
| commit | 5c5d0d7050286e14a6ca18b8d77fc7a34f701206 (patch) | |
| tree | 2eae906a65550d18e2e571ab4100110f883a52e2 /Documentation/admin-guide/device-mapper | |
| parent | d43929ef65a60b4c44a5f85cdce826c4e33a67d3 (diff) | |
| download | lwn-5c5d0d7050286e14a6ca18b8d77fc7a34f701206.tar.gz lwn-5c5d0d7050286e14a6ca18b8d77fc7a34f701206.zip | |
dm-verity: support block number limits for different ioprio classes
Calling verity_verify_io in bh for IO of all sizes is not suitable for
embedded devices. From our tests, it can improve the performance of 4K
synchronise random reads.
For example:
./fio --name=rand_read --ioengine=psync --rw=randread --bs=4K \
--direct=1 --numjobs=8 --runtime=60 --time_based --group_reporting \
--filename=/dev/block/mapper/xx-verity
But it will degrade the performance of 512K synchronise sequential reads
on our devices.
For example:
./fio --name=read --ioengine=psync --rw=read --bs=512K --direct=1 \
--numjobs=8 --runtime=60 --time_based --group_reporting \
--filename=/dev/block/mapper/xx-verity
A parameter array is introduced by this change. And users can modify the
default config by /sys/module/dm_verity/parameters/use_bh_bytes.
The default limits for NONE/RT/BE is set to 8192.
The default limits for IDLE is set to 0.
Call verity_verify_io directly when verity_end_io is not in hardirq.
Signed-off-by: LongPing Wei <weilongping@oppo.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'Documentation/admin-guide/device-mapper')
| -rw-r--r-- | Documentation/admin-guide/device-mapper/verity.rst | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Documentation/admin-guide/device-mapper/verity.rst b/Documentation/admin-guide/device-mapper/verity.rst index fb3a045d0c72..8c3f1f967a3c 100644 --- a/Documentation/admin-guide/device-mapper/verity.rst +++ b/Documentation/admin-guide/device-mapper/verity.rst @@ -151,8 +151,15 @@ root_hash_sig_key_desc <key_description> already in the secondary trusted keyring. try_verify_in_tasklet - If verity hashes are in cache, verify data blocks in kernel tasklet instead - of workqueue. This option can reduce IO latency. + If verity hashes are in cache and the IO size does not exceed the limit, + verify data blocks in bottom half instead of workqueue. This option can + reduce IO latency. The size limits can be configured via + /sys/module/dm_verity/parameters/use_bh_bytes. The four parameters + correspond to limits for IOPRIO_CLASS_NONE, IOPRIO_CLASS_RT, + IOPRIO_CLASS_BE and IOPRIO_CLASS_IDLE in turn. + For example: + <none>,<rt>,<be>,<idle> + 4096,4096,4096,4096 Theory of operation =================== |
