Whamcloud - gitweb
LU-14622 osd: mark pages accessed on reads
authorAlex Zhuravlev <bzzz@whamcloud.com>
Mon, 19 Apr 2021 06:10:17 +0000 (09:10 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 15 Jul 2021 08:44:13 +0000 (08:44 +0000)
to improve cache hit ratio

Lustre-change: https://review.whamcloud.com/43367
Lustre-commit: 7a2011a4ecee773a5f8064e1e00d441f73aa5b15

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: If4850465d118ed62e9da105dc0cf144ff5041fd3
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/44265
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/osd-ldiskfs/osd_io.c

index d175fde..dd337b2 100644 (file)
@@ -45,6 +45,7 @@
 /* prerequisite for linux/xattr.h */
 #include <linux/fs.h>
 #include <linux/mm.h>
+#include <linux/swap.h>
 #include <linux/pagevec.h>
 
 /*
@@ -907,6 +908,8 @@ bypass_checks:
                        GOTO(cleanup, rc = -ENOMEM);
 
                lnb->lnb_locked = 1;
+               if (cache)
+                       mark_page_accessed(lnb->lnb_page);
        }
 
 #if 0