Whamcloud - gitweb
LU-14622 osd: mark pages accessed on reads 67/43367/6
authorAlex Zhuravlev <bzzz@whamcloud.com>
Mon, 19 Apr 2021 06:10:17 +0000 (09:10 +0300)
committerOleg Drokin <green@whamcloud.com>
Thu, 27 May 2021 18:17:56 +0000 (18:17 +0000)
to improve cache hit ratio

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

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