]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: reduce context switches for synchronous buffered I/O
authorChristoph Hellwig <hch@lst.de>
Mon, 24 Feb 2025 23:48:52 +0000 (15:48 -0800)
committerCarlos Maiolino <cem@kernel.org>
Tue, 25 Feb 2025 12:05:59 +0000 (13:05 +0100)
commit4b90de5bc0f5a6d1151acd74c838275f9b7be3a5
treee82c053b7dba02ecb6ea1444aab0f871a7454f88
parent2d873efd174bae9005776937d5ac6a96050266db
xfs: reduce context switches for synchronous buffered I/O

Currently all metadata I/O completions happen in the m_buf_workqueue
workqueue.  But for synchronous I/O (i.e. all buffer reads) there is no
need for that, as there always is a called in process context that is
waiting for the I/O.  Factor out the guts of xfs_buf_ioend into a
separate helper and call it from xfs_buf_iowait to avoid a double
an extra context switch to the workqueue.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_buf.c