[Devel] [PATCH RHEL7 COMMIT] mm/tcache: rebalance tree if isolation failed

Konstantin Khorenko khorenko at virtuozzo.com
Thu Oct 18 16:17:37 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-862.14.4.vz7.72.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.14.4.vz7.72.11
------>
commit c322a6f3894906a47613166668ff63e4744b5439
Author: Andrey Ryabinin <aryabinin at virtuozzo.com>
Date:   Thu Oct 18 16:17:35 2018 +0300

    mm/tcache: rebalance tree if isolation failed
    
    tcache_lru_isolate() doesn't rebalance reclaim tree if isolation
    failed. If the first pool in tree is empty, without rebalancing it
    may stay first indefinitely long preventing reclaim.
    
    https://jira.sw.ru/browse/PSBM-89403
    Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
    Acked-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 mm/tcache.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/mm/tcache.c b/mm/tcache.c
index 960450bb825e..eb9c9dea4e51 100644
--- a/mm/tcache.c
+++ b/mm/tcache.c
@@ -1109,9 +1109,6 @@ tcache_lru_isolate(int nid, struct page **pages, int nr_to_isolate)
 	spin_lock_irq(&pni->lock);
 	nr_isolated = __tcache_lru_isolate(pni, pages, nr_to_isolate);
 
-	if (!nr_isolated)
-		goto unlock;
-
 	if (!RB_EMPTY_NODE(rbn) || !list_empty(&pni->lru)) {
 		spin_lock(&ni->lock);
 		if (!RB_EMPTY_NODE(rbn))
@@ -1123,7 +1120,7 @@ tcache_lru_isolate(int nid, struct page **pages, int nr_to_isolate)
 		update_ni_rb_first(ni);
 		spin_unlock(&ni->lock);
 	}
-unlock:
+
 	spin_unlock_irq(&pni->lock);
 	tcache_put_pool(pni->pool);
 out:



More information about the Devel mailing list