Skip to contentSkip to conversation

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

PATCH In review Hui Zhu 2 participants 2 messages Aug 16, 2017 – Aug 17, 2017

Subsystems (2)
lore
Share & tools
lore

Hui Zhu

author
#0 lore raw

PATCH 1/1 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

---
 mm/zsmalloc.c | 5 -----
 1 file changed, 5 deletions(-)
mm/zsmalloc.c +0 -5
index fb99953..8560c93 100644
@@ -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);
Signature · 7 lines
1.9.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · 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

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 [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>