]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iomap: add dirty page control to iomap_zero_iter
authorChi Zhiling <chizhiling@kylinos.cn>
Mon, 11 May 2026 09:40:07 +0000 (17:40 +0800)
committerChristian Brauner <brauner@kernel.org>
Mon, 11 May 2026 13:35:03 +0000 (15:35 +0200)
commitecf22101ba7a398eb1aefbb4eaba5fdddf7b08e4
tree9ab4aaf3db195bf43b5ac54a924e695872d3fe11
parentbd6a1379a41acfc38edf15e2c15aecb0694a7fba
iomap: add dirty page control to iomap_zero_iter

This patch prepares the iomap framework for exFAT's upcoming migration to
iomap. During testing of the exFAT iomap branch with xfstests generic/299 on
a VM with 8GB RAM and a 40GB disk, system unresponsiveness was observed.

iomap_zero_iter() lacked dirty page throttling, which could cause memory
pressure when exFAT's valid_size mechanism triggers large-scale zeroing
operations during writes beyond valid_size.

Align iomap_zero_iter() with iomap_write_iter() by adding
balance_dirty_pages_ratelimited() to throttle dirty page generation during
large zeroing operations

Signed-off-by: Chi Zhiling <chizhiling@kylinos.cn>
Link: https://patch.msgid.link/20260511094007.728011-1-chizhiling@163.com
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/iomap/buffered-io.c