[Devel] [PATCH RHEL8 COMMIT] mm: Honor changing per-memcg s[un]reclaimable counters to bytes in kmem bypass hack

Konstantin Khorenko khorenko at virtuozzo.com
Wed Aug 18 20:56:42 MSK 2021


The commit is pushed to "branch-rh8-4.18.0-305.3.1.vz8.7.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-305.3.1.vz8.7.7
------>
commit e947dd117e30370980c822e7c64a53a40abe2cca
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date:   Wed Aug 18 13:48:01 2021 +0300

    mm: Honor changing per-memcg s[un]reclaimable counters to bytes in kmem bypass hack
    
    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);


More information about the Devel mailing list