From: Alex Zhuravlev Date: Mon, 19 Apr 2021 06:10:17 +0000 (+0300) Subject: LU-14622 osd: mark pages accessed on reads X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=3cf8b6e2bae11eb8648a2b9cbef3ce35e41d117d;p=fs%2Flustre-release.git LU-14622 osd: mark pages accessed on reads to improve cache hit ratio Lustre-change: https://review.whamcloud.com/43367 Lustre-commit: 7a2011a4ecee773a5f8064e1e00d441f73aa5b15 Signed-off-by: Alex Zhuravlev Change-Id: If4850465d118ed62e9da105dc0cf144ff5041fd3 Reviewed-by: Andreas Dilger Reviewed-by: Wang Shilong Reviewed-on: https://review.whamcloud.com/44265 Tested-by: jenkins Tested-by: Maloo --- diff --git a/lustre/osd-ldiskfs/osd_io.c b/lustre/osd-ldiskfs/osd_io.c index d175fde..dd337b2 100644 --- a/lustre/osd-ldiskfs/osd_io.c +++ b/lustre/osd-ldiskfs/osd_io.c @@ -45,6 +45,7 @@ /* prerequisite for linux/xattr.h */ #include #include +#include #include /* @@ -907,6 +908,8 @@ bypass_checks: GOTO(cleanup, rc = -ENOMEM); lnb->lnb_locked = 1; + if (cache) + mark_page_accessed(lnb->lnb_page); } #if 0