From ff832c97fe618fa64141adbda55a881891c237a7 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Fri, 3 Nov 2023 17:49:29 -0600 Subject: [PATCH] LU-10465 osd-ldiskfs: 8MiB IOs should bypass cache Changes the writethrough_max_io_mb and readcache_max_io_mb params to check for IO size >= max_io_mb instead of > max_io_mb when deciding to bypass cache. Read/write IOs that are 8MiB in size should bypass the pagecache on the OSTs, rather than requiring IOs that are slightly larger than this. 8MiB is enough to submit 1MiB to each HDD spindle in an 8+2 RAID6, and caching these writes on the OSS is not helping. Lustre-change: https://review.whamcloud.com/52989 Lustre-commit: TBD (from dcdc4748f1443981a170bc2945b178226e64a6d4) Test-Parameters: trivial Fixes: 3043c6f189 ("LU-12071 osd-ldiskfs: bypass pagecache if requested") Signed-off-by: Andreas Dilger Change-Id: Iae435f5b99e2e8bc6a9458fedad65a81c2853350 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53033 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Alex Zhuravlev --- lustre/osd-ldiskfs/osd_internal.h | 4 ++-- lustre/osd-ldiskfs/osd_io.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lustre/osd-ldiskfs/osd_internal.h b/lustre/osd-ldiskfs/osd_internal.h index dfd41ed..d2740b4 100644 --- a/lustre/osd-ldiskfs/osd_internal.h +++ b/lustre/osd-ldiskfs/osd_internal.h @@ -315,11 +315,11 @@ struct osd_device { * served bypassing pagecache unless already cached */ unsigned long long od_readcache_max_filesize; - /* reads > od_readcache_max_iosize will be + /* reads >= od_readcache_max_iosize will be * served bypassing pagecache unless already cached */ unsigned long od_readcache_max_iosize; - /* writes > od_writethough_max_iosize will be + /* writes >= od_writethough_max_iosize will be * served bypassing pagecache unless already cached */ unsigned long od_writethrough_max_iosize; diff --git a/lustre/osd-ldiskfs/osd_io.c b/lustre/osd-ldiskfs/osd_io.c index 2d5596b..d967f9e 100644 --- a/lustre/osd-ldiskfs/osd_io.c +++ b/lustre/osd-ldiskfs/osd_io.c @@ -889,7 +889,7 @@ static int osd_bufs_get(const struct lu_env *env, struct dt_object *dt, cache = false; break; } - if (iosize > osd->od_writethrough_max_iosize) { + if (iosize >= osd->od_writethrough_max_iosize) { cache = false; break; } @@ -898,7 +898,7 @@ static int osd_bufs_get(const struct lu_env *env, struct dt_object *dt, cache = false; break; } - if (iosize > osd->od_readcache_max_iosize) { + if (iosize >= osd->od_readcache_max_iosize) { cache = false; break; } -- 1.8.3.1