public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] Implement concurrent buffered write with folio lock
@ 2025-04-25 10:38 Chi Zhiling
  2025-04-25 10:38 ` [RFC PATCH 1/2] xfs: Add i_direct_mode to indicate the IO mode of inode Chi Zhiling
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Chi Zhiling @ 2025-04-25 10:38 UTC (permalink / raw)
  To: cem; +Cc: linux-xfs, linux-kernel, Chi Zhiling

From: Chi Zhiling <chizhiling@kylinos.cn>

This is a patch attempting to implement concurrent buffered writes.
The main idea is to use the folio lock to ensure the atomicity of the
write when writing to a single folio, instead of using the i_rwsem.

I tried the "folio batch" solution, which is a great idea, but during
testing, I encountered an OOM issue because the locked folios couldn't
be reclaimed.

So for now, I can only allow concurrent writes within a single block.
The good news is that since we already support BS > PS, we can use a
larger block size to enable higher granularity concurrency.

These ideas come from previous discussions:
https://lore.kernel.org/all/953b0499-5832-49dc-8580-436cf625db8c@163.com/


Chi Zhiling (2):
  xfs: Add i_direct_mode to indicate the IO mode of inode
  xfs: Enable concurrency when writing within single block

 fs/xfs/xfs_file.c  | 71 ++++++++++++++++++++++++++++++++++++++++++----
 fs/xfs/xfs_inode.h |  6 ++++
 2 files changed, 72 insertions(+), 5 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-05-01 23:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-25 10:38 [RFC PATCH 0/2] Implement concurrent buffered write with folio lock Chi Zhiling
2025-04-25 10:38 ` [RFC PATCH 1/2] xfs: Add i_direct_mode to indicate the IO mode of inode Chi Zhiling
2025-04-25 15:12   ` Darrick J. Wong
2025-04-26  1:28     ` Chi Zhiling
2025-04-25 10:38 ` [RFC PATCH 2/2] xfs: Enable concurrency when writing within single block Chi Zhiling
2025-04-25 15:15   ` Darrick J. Wong
2025-04-26  1:34     ` Chi Zhiling
2025-04-30  2:05 ` [RFC PATCH 0/2] Implement concurrent buffered write with folio lock Dave Chinner
2025-04-30  9:03   ` Chi Zhiling
2025-04-30 23:45     ` Dave Chinner
2025-05-01 23:57       ` Chi Zhiling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox