[Devel] [PATCH RHEL7 COMMIT] mm: Fixing rwsem_is_contented conditional code in shrink_slab_memcg

Vasily Averin vvs at virtuozzo.com
Fri Aug 21 17:41:45 MSK 2020


The commit is pushed to "branch-rh7-3.10.0-1127.18.2.vz7.163.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1127.18.2.vz7.163.5
------>
commit 41057a6cdd8f0c3d4c8bf9cb4ad5254b62127b98
Author: Valeriy Vdovin <valeriy.vdovin at virtuozzo.com>
Date:   Fri Aug 21 17:41:44 2020 +0300

    mm: Fixing rwsem_is_contented conditional code in shrink_slab_memcg
    
    Fixes commit 38afbd5ecdd6 ("Reduce access frequency to shrinker_rwsem during shrink_slab")
    that partially reverts code in shrink_slab_memcg by adding missing line.
    
    https://jira.sw.ru/browse/PSBM-99181
    
    Signed-off-by: Valeriy Vdovin <valeriy.vdovin at virtuozzo.com>
---
 mm/vmscan.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 4fa86e7..13ae9bd 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -598,6 +598,7 @@ static unsigned long shrink_slab_memcg(gfp_t gfp_mask, int nid,
 			map = memcg_nid_shrinker_map(memcg, nid);
 			nr_max = min(shrinker_nr_max, map->nr_max);
 		} else if (rwsem_is_contended(&shrinker_rwsem)) {
+			freed = freed ? : 1;
 			break;
 		}
 	}


More information about the Devel mailing list