test another version of le9 from pf-kernel maintainer

This commit is contained in:
Mikhail Novosyolov 2020-12-26 19:53:02 +03:00
parent b62e019833
commit 24a4eefc34
2 changed files with 13 additions and 16 deletions

View file

@ -24,7 +24,7 @@
%define sublevel 2
# Release number. Increase this before a rebuild.
%define rpmrel 3
%define rpmrel 4
%define fullrpmrel %{rpmrel}
%define rpmtag %{disttag}
@ -311,7 +311,7 @@ Patch305: 0001-crypto-support-loading-GOST-signed-kernel-modules.patch
Patch306: 0001-ROSA-ima-allow-to-off-modules-signature-check-dynami.patch
# (WIP, experimantal) https://www.linux.org.ru/news/kernel/16052362
#Patch307: rosa-le9.diff
# https://www.linux.org.ru/news/kernel/16052362?cid=16073153
# https://www.linux.org.ru/news/kernel/16052362?cid=16075323
Patch307: le9pf.diff
# Disable AutoReq

View file

@ -143,7 +143,7 @@ index 390165ffbb0f..1e1fb8ad434a 100644
def_bool y
depends on (!SELECT_MEMORY_MODEL && ARCH_DISCONTIGMEM_ENABLE) || DISCONTIGMEM_MANUAL
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 7b4e31eac2cf..c017f44960f6 100644
index 7b4e31eac2cf..93760769d676 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -166,6 +166,11 @@ struct scan_control {
@ -169,24 +169,21 @@ index 7b4e31eac2cf..c017f44960f6 100644
/*
* Determine how aggressively the anon and file LRU lists should be
* scanned. The relative value of each set of LRU lists is determined
@@ -2418,6 +2427,22 @@ static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc,
@@ -2418,6 +2427,19 @@ static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc,
BUG();
}
+#if defined(CONFIG_UNEVICTABLE_ACTIVEFILE)
+ if (lru == LRU_ACTIVE_FILE) {
+ unsigned long kib_active_file_now = K(global_node_page_state(NR_ACTIVE_FILE));
+ if (kib_active_file_now < sysctl_unevictable_activefile_kbytes_low &&
+ kib_active_file_now > sysctl_unevictable_activefile_kbytes_min) {
+ nr[lru] = scan *
+ (kib_active_file_now -
+ sysctl_unevictable_activefile_kbytes_min) /
+ (sysctl_unevictable_activefile_kbytes_low -
+ sysctl_unevictable_activefile_kbytes_min);
+ } else if (kib_active_file_now <= sysctl_unevictable_activefile_kbytes_min) {
+ nr[lru] = 0;
+ continue;
+ }
+ unsigned long activefile_kbytes_now = K(global_node_page_state(NR_ACTIVE_FILE));
+ unsigned long low_scan_granularity = SWAP_CLUSTER_MAX >> sc->priority;
+
+ if (activefile_kbytes_now < sysctl_unevictable_activefile_kbytes_low &&
+ activefile_kbytes_now > sysctl_unevictable_activefile_kbytes_min &&
+ scan > low_scan_granularity)
+ scan = low_scan_granularity;
+ else if (activefile_kbytes_now <= sysctl_unevictable_activefile_kbytes_min)
+ scan = 0;
+ }
+#endif
nr[lru] = scan;