[RFC PATCH 23/25] mm/zsmalloc: convert zs_reclaim_page() to use zsdesc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Convert zs_reclaim_page() to use zsdesc and update its comments
accordingly.

Signed-off-by: Hyeonggon Yoo <42.hyeyoo@xxxxxxxxx>
---
 mm/zsmalloc.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index b6ca93012c9a..7153688f5bca 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -2802,7 +2802,7 @@ static int zs_reclaim_page(struct zs_pool *pool, unsigned int retries)
 	int i, obj_idx, ret = 0;
 	unsigned long handle;
 	struct zspage *zspage;
-	struct page *page;
+	struct zsdesc *zsdesc;
 	enum fullness_group fullness;
 
 	/* Lock LRU and fullness list */
@@ -2830,16 +2830,16 @@ static int zs_reclaim_page(struct zs_pool *pool, unsigned int retries)
 		spin_unlock(&pool->lock);
 		cond_resched();
 
-		/* Lock backing pages into place */
+		/* Lock backing zsdescs into place */
 		lock_zspage(zspage);
 
 		obj_idx = 0;
-		page = get_first_page(zspage);
+		zsdesc = get_first_zsdesc(zspage);
 		while (1) {
-			handle = find_alloced_obj(class, page_zsdesc(page), &obj_idx);
+			handle = find_alloced_obj(class, zsdesc, &obj_idx);
 			if (!handle) {
-				page = get_next_page(page);
-				if (!page)
+				zsdesc = get_next_zsdesc(zsdesc);
+				if (!zsdesc)
 					break;
 				obj_idx = 0;
 				continue;
@@ -2870,7 +2870,7 @@ static int zs_reclaim_page(struct zs_pool *pool, unsigned int retries)
 		if (!get_zspage_inuse(zspage)) {
 			/*
 			 * Fullness went stale as zs_free() won't touch it
-			 * while the page is removed from the pool. Fix it
+			 * while the zsdesc is removed from the pool. Fix it
 			 * up for the check in __free_zspage().
 			 */
 			zspage->fullness = ZS_EMPTY;
-- 
2.25.1





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux