[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250211135331.933681-1-lihongbo22@huawei.com>
Date: Tue, 11 Feb 2025 21:53:27 +0800
From: Hongbo Li <lihongbo22@...wei.com>
To: <xiang@...nel.org>, <chao@...nel.org>
CC: <zbestahu@...il.com>, <jefflexu@...ux.alibaba.com>, <dhavale@...gle.com>,
<linux-erofs@...ts.ozlabs.org>, <linux-kernel@...r.kernel.org>,
<lihongbo22@...wei.com>
Subject: [PATCH v2 0/4] erofs: file-backed mount supports direct io
erofs has add file-backed mount support. In this scenario, only buffer
io is allowed. So we enhance the io mode by implementing the direct
io. Also, this can make the iov_iter (user buffer) interact with the
backed file's page cache directly.
To be mentioned, the direct io is atomic, if the part of the iov_iter
of direct io failed, the whole direct io also fails.
We conduct the basic test on direct io and normal io, the fio is used in
the test, the results show it can decrease the memory overhead. It slower
than normal io in seq read due to erofs page cache and readahead, uut in
rand read direct io is similar than buffer io. The results are reasonable.
v2:
- Reuse the original erofs_fileio_scan_folio logic and do some construction.
v1:
- https://lore.kernel.org/all/47f74598-1b2f-4308-a8b8-18fc40bafe6d@linux.alibaba.com/T/
Comments and questions are, as always, welcome.
Thanks,
Hongbo.
Hongbo Li (4):
erofs: decouple the iterator on folio
erofs: decouple callback action for fileio bio
erofs: add erofs_fileio_direct_io helper to handle direct io
erofs: file-backed mount supports direct io
fs/erofs/data.c | 10 ++-
fs/erofs/fileio.c | 170 ++++++++++++++++++++++++++++++++++++++--------
2 files changed, 148 insertions(+), 32 deletions(-)
--
2.34.1
Powered by blists - more mailing lists