[lustre-devel] [PATCH 12/25] lustre: lov: Improve DIO submit
James Simmons
jsimmons at infradead.org
Mon Aug 2 12:50:32 PDT 2021
From: Patrick Farrell <farr0186 at gmail.com>
Skip some unnecessary looping in page submission for the
DIO case.
This gives about a 2% improvement for AIO/DIO page
submission.
This patch reduces i/o time in ms/GiB by:
Write: 2 ms/GiB
Read: 2 ms/GiB
Totals:
Write: 172 ms/GiB
Read: 165 ms/GiB
mpirun -np 1 $IOR -w -r -t 64M -b 64G -o ./iorfile --posix.odirect
With previous patches in series:
write 7726 MiB/s
read 5899 MiB/s
Plus this patch:
write 5954 MiB/s
read 6217 MiB/s
WC-bug-id: https://jira.whamcloud.com/browse/LU-13799
Lustre-commit: d31647c017a390c9 ("LU-13799 lov: Improve DIO submit")
Signed-off-by: Patrick Farrell <farr0186 at gmail.com>
Reviewed-on: https://review.whamcloud.com/39446
Reviewed-by: Wang Shilong <wshilong at whamcloud.com>
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
fs/lustre/lov/lov_io.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/fs/lustre/lov/lov_io.c b/fs/lustre/lov/lov_io.c
index 9012ad6..2885943 100644
--- a/fs/lustre/lov/lov_io.c
+++ b/fs/lustre/lov/lov_io.c
@@ -1255,11 +1255,15 @@ static int lov_io_submit(const struct lu_env *env,
struct lov_io *lio = cl2lov_io(env, ios);
struct lov_io_sub *sub;
struct cl_page_list *plist = &lov_env_info(env)->lti_plist;
- struct cl_page *page;
+ struct cl_page *page = cl_page_list_first(qin);
struct cl_page *tmp;
+ bool dio = false;
int index;
int rc = 0;
+ if (page->cp_type == CPT_TRANSIENT)
+ dio = true;
+
cl_page_list_init(plist);
while (qin->pl_nr > 0) {
struct cl_2queue *cl2q = &lov_env_info(env)->lti_cl2q;
@@ -1281,12 +1285,17 @@ static int lov_io_submit(const struct lu_env *env,
cl_page_list_move(&cl2q->c2_qin, qin, page);
index = page->cp_lov_index;
- cl_page_list_for_each_safe(page, tmp, qin) {
- /* this page is not on this stripe */
- if (index != page->cp_lov_index)
- continue;
-
- cl_page_list_move(&cl2q->c2_qin, qin, page);
+ /* DIO is already split by stripe */
+ if (!dio) {
+ cl_page_list_for_each_safe(page, tmp, qin) {
+ /* this page is not on this stripe */
+ if (index != page->cp_lov_index)
+ continue;
+
+ cl_page_list_move(&cl2q->c2_qin, qin, page);
+ }
+ } else {
+ cl_page_list_splice(qin, &cl2q->c2_qin);
}
sub = lov_sub_get(env, lio, index);
--
1.8.3.1
More information about the lustre-devel
mailing list