Whamcloud - gitweb
LU-10465 osd-ldiskfs: 8MiB IOs should bypass cache 89/52989/3
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 3 Nov 2023 23:49:29 +0000 (17:49 -0600)
committerOleg Drokin <green@whamcloud.com>
Sat, 18 Nov 2023 21:40:57 +0000 (21:40 +0000)
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.

Test-Parameters: trivial
Fixes: 3043c6f189 ("LU-12071 osd-ldiskfs: bypass pagecache if requested")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Iae435f5b99e2e8bc6a9458fedad65a81c2853350
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52989
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osd-ldiskfs/osd_internal.h
lustre/osd-ldiskfs/osd_io.c

index 3051ab1..b3c3488 100644 (file)
@@ -311,11 +311,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;
 
index e8a3e0b..b90ca67 100644 (file)
@@ -760,7 +760,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;
                        }
@@ -769,7 +769,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;
                        }