[Devel] [PATCH RHEL7 COMMIT] mm/tcache: don't insert empty reclaim node

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 f1d2d2dc308cee294aff318ad62892fcbccb434f
Author: Andrey Ryabinin <aryabinin at virtuozzo.com>
Date:   Thu Oct 18 16:17:34 2018 +0300

    mm/tcache: don't insert empty reclaim node
    
    If tcache_lru_del() deletes last page from node we don't need to
    insert reclaim node into tree.
    
    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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/tcache.c b/mm/tcache.c
index 9fc7cbf1c40b..960450bb825e 100644
--- a/mm/tcache.c
+++ b/mm/tcache.c
@@ -319,7 +319,8 @@ static void tcache_lru_del(struct tcache_pool *pool, struct page *page,
 		spin_lock(&ni->lock);
 		if (!RB_EMPTY_NODE(&pni->reclaim_node))
 			rb_erase(&pni->reclaim_node, &ni->reclaim_tree);
-		__tcache_insert_reclaim_node(ni, pni);
+		if (!list_empty(&pni->lru))
+			__tcache_insert_reclaim_node(ni, pni);
 		update_ni_rb_first(ni);
 		spin_unlock(&ni->lock);
 	}



More information about the Devel mailing list