From b8553978789ad3dd0776c0543dea4641804d0ac5 Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Fri, 7 May 2021 15:51:32 -0400 Subject: [PATCH] LU-13799 clio: Skip prep for transients The work done by cpo_prep() (etc) is unnecessary for transient pages. This gives only a minimal performance boost and is better seen as a step towards removing the cl_page abstraction for transient pages. But, it does consistently give around 1% better performance. This patch reduces i/o time in ms/GiB by: Write: 1 ms/GiB Read: 1 ms/GiB Totals: Write: 169 ms/GiB Read: 161 ms/GiB mpirun -np 1 $IOR -w -r -t 64M -b 64G -o ./iorfile --posix.odirect With previous patches in series: write 6028 MiB/s read 6305 MiB/s Plus this patch: write 6071 MiB/s read 6355 MiB/s Signed-off-by: Patrick Farrell Change-Id: Ib94f57cde468c9aaea952e1bb89db8fcf4b35e07 Reviewed-on: https://review.whamcloud.com/39448 Reviewed-by: Wang Shilong Reviewed-by: Andreas Dilger Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/obdclass/cl_page.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lustre/obdclass/cl_page.c b/lustre/obdclass/cl_page.c index 5525ef5..0dc44cf 100644 --- a/lustre/obdclass/cl_page.c +++ b/lustre/obdclass/cl_page.c @@ -983,13 +983,16 @@ int cl_page_prep(const struct lu_env *env, struct cl_io *io, if (crt >= CRT_NR) return -EINVAL; - cl_page_slice_for_each(cl_page, slice, i) { - if (slice->cpl_ops->cpo_own) - result = (*slice->cpl_ops->io[crt].cpo_prep)(env, + if (cl_page->cp_type != CPT_TRANSIENT) { + cl_page_slice_for_each(cl_page, slice, i) { + if (slice->cpl_ops->cpo_own) + result = + (*slice->cpl_ops->io[crt].cpo_prep)(env, slice, io); - if (result != 0) - break; + if (result != 0) + break; + } } if (result >= 0) { -- 1.8.3.1