[Devel] [PATCH vz8 2/5] mm: Honor changing per-memcg s[un]reclaimable counters to bytes in kmem bypass hack

Konstantin Khorenko khorenko at virtuozzo.com
Wed Aug 18 14:29:26 MSK 2021


RHEL8.4 has following ms commit backported:
d42f3245c7e2 ("mm: memcg: convert vmstat slab counters to bytes")

So, update places were we use per-memcg counters NR_SLAB_[UN]RECLAIMABLE_B
accordingly.

https://jira.sw.ru/browse/PSBM-132893
Fixes: 66ca21ca4b97 ("mm: allow kmem limit bypassing if reclaimable
slabs detected")

Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 mm/memcontrol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index a1c9cb362b74..efa668101430 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2823,7 +2823,7 @@ extern bool dcache_is_low(struct mem_cgroup *memcg);
  */
 static bool kmem_reclaim_is_low(struct mem_cgroup *memcg)
 {
-#define	KMEM_RECLAIM_LOW_MARK	32
+#define	KMEM_RECLAIM_LOW_MARK	32 * PAGE_SIZE
 
 	unsigned long dcache;
 	int vfs_cache_min_ratio = READ_ONCE(sysctl_vfs_cache_min_ratio);
-- 
2.28.0



More information about the Devel mailing list