Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1712742 > unrolled thread

[PATCH] zsmalloc: zs_page_isolate: skip unnecessary loops but not return false if zspage is not inuse

Started byHui Zhu <zhuhui@xiaomi.com>
First post2017-08-16 10:00 +0200
Last post2017-08-17 07:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] zsmalloc: zs_page_isolate: skip unnecessary loops but not return false if zspage is not inuse Hui Zhu <zhuhui@xiaomi.com> - 2017-08-16 10:00 +0200
    Re: [PATCH] zsmalloc: zs_page_isolate: skip unnecessary loops but  not return false if zspage is not inuse Minchan Kim <minchan@kernel.org> - 2017-08-17 07:40 +0200

#1712742 — [PATCH] zsmalloc: zs_page_isolate: skip unnecessary loops but not return false if zspage is not inuse

FromHui Zhu <zhuhui@xiaomi.com>
Date2017-08-16 10:00 +0200
Subject[PATCH] zsmalloc: zs_page_isolate: skip unnecessary loops but not return false if zspage is not inuse
Message-ID<uf1p7-4gv-13@gated-at.bofh.it>
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@xiaomi.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

[toc] | [next] | [standalone]


#1713551 — Re: [PATCH] zsmalloc: zs_page_isolate: skip unnecessary loops but not return false if zspage is not inuse

FromMinchan Kim <minchan@kernel.org>
Date2017-08-17 07:40 +0200
SubjectRe: [PATCH] zsmalloc: zs_page_isolate: skip unnecessary loops but not return false if zspage is not inuse
Message-ID<uflHb-lG-3@gated-at.bofh.it>
In reply to#1712742
On Wed, Aug 16, 2017 at 03:49:54PM +0800, Hui Zhu wrote:
> 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@xiaomi.com>
Acked-by: Minchan Kim <minchan@kernel.org>

Andrew,
Could you fold this to zsmalloc-zs_page_migrate-skip-unnecessary-loops-but-not-return-ebusy-if-zspage-is-not-inuse?

Thanks!

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web