summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_re.py
diff options
context:
space:
mode:
authorJoanne Koong <joannelkoong@gmail.com>2025-11-11 11:36:53 -0800
committerChristian Brauner <brauner@kernel.org>2025-11-12 10:50:32 +0100
commit6b1fd2281fb0873ec56f8791d4e4898302070804 (patch)
treef0f1597493b50e586e7958e966d80217d290d5be /scripts/lib/kdoc/kdoc_re.py
parent7e6cea5ae2f5e62112fce69acc07ee8b694b6dd0 (diff)
iomap: optimize pending async writeback accounting
Pending writebacks must be accounted for to determine when all requests have completed and writeback on the folio should be ended. Currently this is done by atomically incrementing ifs->write_bytes_pending for every range to be written back. Instead, the number of atomic operations can be minimized by setting ifs->write_bytes_pending to the folio size, internally tracking how many bytes are written back asynchronously, and then after sending off all the requests, decrementing ifs->write_bytes_pending by the number of bytes not written back asynchronously. Now, for N ranges written back, only N + 2 atomic operations are required instead of 2N + 2. Signed-off-by: Joanne Koong <joannelkoong@gmail.com> Link: https://patch.msgid.link/20251111193658.3495942-5-joannelkoong@gmail.com Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_re.py')
0 files changed, 0 insertions, 0 deletions