[RHEL7,COMMIT] memcg: shrink_slab_memcg() cleanup

Submitted by Konstantin Khorenko on Jan. 17, 2020, 9:56 a.m.

Details

Message ID 202001170956.00H9ubPA032425@finist-ce7.sw.ru
State New
Series "memcg: shrink_slab_memcg() cleanup"
Headers show

Commit Message

Konstantin Khorenko Jan. 17, 2020, 9:56 a.m.
The commit is pushed to "branch-rh7-3.10.0-1062.7.1.vz7.130.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1062.7.1.vz7.130.10
------>
commit 935c73caaf360374b8d63f34416264e0ed6fd5e2
Author: Vasily Averin <vvs@virtuozzo.com>
Date:   Fri Jan 17 12:56:36 2020 +0300

    memcg: shrink_slab_memcg() cleanup
    
    After update shrink_slab_memcg() releases shrinker_rwsem and then takes
    it back. It makes useless rwsem_is_contended(&shrinker_rwsem) check.
    
    Fixes: 311e5a4499163 ("mm: fix hanging shrinker management on long
    do_shrink_slab")
    
    Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
    Acked-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
---
 mm/vmscan.c | 5 -----
 1 file changed, 5 deletions(-)

Patch hide | download patch | download mbox

diff --git a/mm/vmscan.c b/mm/vmscan.c
index ec3443ad161bd..52a3679115bdd 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -572,11 +572,6 @@  static unsigned long shrink_slab_memcg(gfp_t gfp_mask, int nid,
 		put_shrinker(shrinker);
 		map = memcg_nid_shrinker_map(memcg, nid);
 		nr_max = min(shrinker_nr_max, map->nr_max);
-
-		if (rwsem_is_contended(&shrinker_rwsem)) {
-			freed = freed ? : 1;
-			break;
-		}
 	}
 unlock:
 	up_read(&shrinker_rwsem);