Whamcloud - gitweb
LU-17463 osc: add option to disable page cache shrinker
authorQian Yingjin <qian@ddn.com>
Wed, 24 Jan 2024 02:43:38 +0000 (21:43 -0500)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 27 Apr 2024 22:32:56 +0000 (22:32 +0000)
commit805a3cb65f00705780c9cbb09235bea2f22ce333
treeedb91eefa12124f2bb171cb10b3f8049aa85dc7f
parent3e31fd16d31d7dc13f7f72ba1b689ffda743ac1f
LU-17463 osc: add option to disable page cache shrinker

The pages mapped into VM_LOCKED [mlocked()ed] VMAs are unevictable
pages. Those pages are marked with PG_mlocked.
However, page cache shrinker in Lustre treats all cached pages
equally even some of them are unevictable. It may evict mlocked
pages by mlock() or mlockall() calls wrongly.

This patch adds an tunable option to enable or disable page cache
shrinker:
- osc.*.enable_page_cache_shrink
It is enabled by default.

Lustre-Change: https://review.whamcloud.com/53795
Lustre-Commit: d90ce0aab10ee8856140720cd71935da6877a5ab

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I23ebf6d438a71c7917b0cb3375407a64587e15db
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54754
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/osc/lproc_osc.c
lustre/osc/osc_internal.h
lustre/osc/osc_page.c
lustre/osc/osc_request.c