All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] zsmalloc: zs_page_isolate: skip unnecessary loops but not return false if zspage is not inuse
@ 2017-08-16  7:49 ` Hui Zhu
  0 siblings, 0 replies; 4+ messages in thread
From: Hui Zhu @ 2017-08-16  7:49 UTC (permalink / raw)
  To: minchan, ngupta, sergey.senozhatsky.work, linux-mm, linux-kernel
  Cc: teawater, Hui Zhu

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] zsmalloc: zs_page_isolate: skip unnecessary loops but not return false if zspage is not inuse
@ 2017-08-16  7:49 ` Hui Zhu
  0 siblings, 0 replies; 4+ messages in thread
From: Hui Zhu @ 2017-08-16  7:49 UTC (permalink / raw)
  To: minchan, ngupta, sergey.senozhatsky.work, linux-mm, linux-kernel
  Cc: teawater, Hui Zhu

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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] zsmalloc: zs_page_isolate: skip unnecessary loops but not return false if zspage is not inuse
  2017-08-16  7:49 ` Hui Zhu
@ 2017-08-17  5:30   ` Minchan Kim
  -1 siblings, 0 replies; 4+ messages in thread
From: Minchan Kim @ 2017-08-17  5:30 UTC (permalink / raw)
  To: Hui Zhu; +Cc: ngupta, sergey.senozhatsky.work, linux-mm, linux-kernel, teawater

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!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] zsmalloc: zs_page_isolate: skip unnecessary loops but not return false if zspage is not inuse
@ 2017-08-17  5:30   ` Minchan Kim
  0 siblings, 0 replies; 4+ messages in thread
From: Minchan Kim @ 2017-08-17  5:30 UTC (permalink / raw)
  To: Hui Zhu; +Cc: ngupta, sergey.senozhatsky.work, linux-mm, linux-kernel, teawater

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!

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-17  5:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-16  7:49 [PATCH] zsmalloc: zs_page_isolate: skip unnecessary loops but not return false if zspage is not inuse Hui Zhu
2017-08-16  7:49 ` Hui Zhu
2017-08-17  5:30 ` Minchan Kim
2017-08-17  5:30   ` Minchan Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.