lkml.org 
[lkml]   [2015]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC][PATCH 01/10] zsmalloc: drop unused variable `nr_to_migrate'
Date
__zs_compact() does not use `nr_to_migrate', drop it.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
---
mm/zsmalloc.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 33d5126..e615b31 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1701,7 +1701,6 @@ static struct page *isolate_source_page(struct size_class *class)
static unsigned long __zs_compact(struct zs_pool *pool,
struct size_class *class)
{
- int nr_to_migrate;
struct zs_compact_control cc;
struct page *src_page;
struct page *dst_page = NULL;
@@ -1712,8 +1711,6 @@ static unsigned long __zs_compact(struct zs_pool *pool,

BUG_ON(!is_first_page(src_page));

- /* The goal is to migrate all live objects in source page */
- nr_to_migrate = src_page->inuse;
cc.index = 0;
cc.s_page = src_page;

@@ -1728,7 +1725,6 @@ static unsigned long __zs_compact(struct zs_pool *pool,

putback_zspage(pool, class, dst_page);
nr_total_migrated += cc.nr_migrated;
- nr_to_migrate -= cc.nr_migrated;
}

/* Stop if we couldn't find slot */
--
2.4.2.337.gfae46aa


\
 
 \ /
  Last update: 2015-05-29 17:41    [W:2.075 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site