[Devel] [PATCH rh7 2/3] mm/tcache: rebalance tree is isolation failed.

Andrey Ryabinin aryabinin at virtuozzo.com
Thu Oct 18 12:02:30 MSK 2018


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>
---
 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:
-- 
2.18.1



More information about the Devel mailing list