summaryrefslogtreecommitdiff
path: root/drivers/platform/wmi/tests/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorFengnan Chang <fengnanchang@gmail.com>2026-04-20 14:16:30 +0800
committerChristian Brauner <brauner@kernel.org>2026-05-11 15:33:14 +0200
commitbd6a1379a41acfc38edf15e2c15aecb0694a7fba (patch)
treee63b03f07f048714e4cd0c430a6f35fc29a42c8f /drivers/platform/wmi/tests/git@git.tavy.me:linux.git
parent254f49634ee16a731174d2ae34bc50bd5f45e731 (diff)
iomap: avoid memset iomap when iter is done
When iomap_iter() finishes its iteration (returns <= 0), it is no longer necessary to memset the entire iomap and srcmap structures. In high-IOPS scenarios (like 4k randread NVMe polling with io_uring), where the majority of I/Os complete in a single extent map, this wasted memory write bandwidth, as the caller will just discard the iterator. Use this command to test: taskset -c 30 ./t/io_uring -p1 -d512 -b4096 -s32 -c32 -F1 -B1 -R1 -X1 -n1 -P1 /mnt/testfile IOPS improve about 5% on ext4 and XFS. However, we MUST still call iomap_iter_reset_iomap() to release the folio_batch if IOMAP_F_FOLIO_BATCH is set, otherwise we leak page references. Therefore, split the cleanup logic: always release the folio_batch, but skip the memset() when ret <= 0. Signed-off-by: Fengnan Chang <changfengnan@bytedance.com> Link: https://patch.msgid.link/20260420061630.62077-1-changfengnan@bytedance.com Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'drivers/platform/wmi/tests/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions