[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1502869794-29263-1-git-send-email-zhuhui@xiaomi.com>
Date: Wed, 16 Aug 2017 15:49:54 +0800
From: Hui Zhu <zhuhui@...omi.com>
To: <minchan@...nel.org>, <ngupta@...are.org>,
<sergey.senozhatsky.work@...il.com>, <linux-mm@...ck.org>,
<linux-kernel@...r.kernel.org>
CC: <teawater@...il.com>, Hui Zhu <zhuhui@...omi.com>
Subject: [PATCH] zsmalloc: zs_page_isolate: skip unnecessary loops but not return false if zspage is not inuse
Like [1], zs_page_isolate meet the same problem if zspage is not inuse.
After [2], zs_page_migrate can support empty zspage now.
Make this patch to let zs_page_isolate skip unnecessary loops but not
return false if zspage is not inuse.
[1] zsmalloc-zs_page_migrate-skip-unnecessary-loops-but-not-return-ebusy-if-zspage-is-not-inuse-fix.patch
[2] zsmalloc-zs_page_migrate-schedule-free_work-if-zspage-is-ZS_EMPTY.patch
Signed-off-by: Hui Zhu <zhuhui@...omi.com>
---
mm/zsmalloc.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index fb99953..8560c93 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1927,11 +1927,6 @@ bool zs_page_isolate(struct page *page, isolate_mode_t mode)
class = pool->size_class[class_idx];
spin_lock(&class->lock);
- if (get_zspage_inuse(zspage) == 0) {
- spin_unlock(&class->lock);
- return false;
- }
-
/* zspage is isolated for object migration */
if (list_empty(&zspage->list) && !is_zspage_isolated(zspage)) {
spin_unlock(&class->lock);
--
1.9.1
Powered by blists - more mailing lists