From 7a2011a4ecee773a5f8064e1e00d441f73aa5b15 Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Mon, 19 Apr 2021 09:10:17 +0300 Subject: [PATCH] LU-14622 osd: mark pages accessed on reads to improve cache hit ratio Signed-off-by: Alex Zhuravlev Change-Id: If4850465d118ed62e9da105dc0cf144ff5041fd3 Reviewed-on: https://review.whamcloud.com/43367 Tested-by: jenkins Reviewed-by: Andreas Dilger Reviewed-by: Wang Shilong Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/osd-ldiskfs/osd_io.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lustre/osd-ldiskfs/osd_io.c b/lustre/osd-ldiskfs/osd_io.c index f8568c7..887ca25 100644 --- a/lustre/osd-ldiskfs/osd_io.c +++ b/lustre/osd-ldiskfs/osd_io.c @@ -44,6 +44,7 @@ /* prerequisite for linux/xattr.h */ #include #include +#include #include /* @@ -906,6 +907,8 @@ bypass_checks: GOTO(cleanup, rc = -ENOMEM); lnb->lnb_locked = 1; + if (cache) + mark_page_accessed(lnb->lnb_page); } #if 0 -- 1.8.3.1