[Devel] [PATCH rh7 3/4] tcache: do not populate on global reclaim

Vladimir Davydov vdavydov at parallels.com
Thu Jul 16 02:03:31 PDT 2015


Just like in case of tswap, there is no point in populating tcache on
global reclaim. It is not that dangerous though, because, in contrast to
tswap, tcache reclaim drops pages instead of moving them back to page
cache.

Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
---
 mm/tcache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/tcache.c b/mm/tcache.c
index 6c1e9e7e047c..649988148eaa 100644
--- a/mm/tcache.c
+++ b/mm/tcache.c
@@ -838,7 +838,7 @@ static void tcache_cleancache_put_page(int pool_id,
 
 	node = tcache_get_node_and_pool(pool_id, &key, true);
 	if (node) {
-		if (tcache_active)
+		if (tcache_active && !(current->flags & PF_MEMALLOC))
 			cache_page = tcache_alloc_page();
 		if (cache_page) {
 			copy_highpage(cache_page, page);
-- 
2.1.4




More information about the Devel mailing list