* [PATCH 0/2] mm/zsmalloc: trivial clean up
@ 2015-03-23 13:26 Sergey Senozhatsky
2015-03-23 13:26 ` [PATCH 1/2] zsmalloc: remove synchronize_rcu from zs_compact() Sergey Senozhatsky
2015-03-23 13:26 ` [PATCH 2/2] zsmalloc: remove extra cond_resched() in __zs_compact Sergey Senozhatsky
0 siblings, 2 replies; 4+ messages in thread
From: Sergey Senozhatsky @ 2015-03-23 13:26 UTC (permalink / raw)
To: Andrew Morton, Minchan Kim
Cc: Nitin Gupta, linux-mm, linux-kernel, Sergey Senozhatsky,
Sergey Senozhatsky
Hello,
Two trivial cleanup patches.
The first one removes synchronize_rcu() from zs_compact().
Neither zsmalloc nor zram use rcu.
The second one removes redundant cond_resched() call before
the compaction busy loop.
Sergey Senozhatsky (2):
zsmalloc: remove synchronize_rcu from zs_compact()
zsmalloc: remove extra cond_resched() in __zs_compact
mm/zsmalloc.c | 4 ----
1 file changed, 4 deletions(-)
--
2.3.3.262.ge80e85a
--
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
* [PATCH 1/2] zsmalloc: remove synchronize_rcu from zs_compact()
2015-03-23 13:26 [PATCH 0/2] mm/zsmalloc: trivial clean up Sergey Senozhatsky
@ 2015-03-23 13:26 ` Sergey Senozhatsky
2015-03-25 15:09 ` Minchan Kim
2015-03-23 13:26 ` [PATCH 2/2] zsmalloc: remove extra cond_resched() in __zs_compact Sergey Senozhatsky
1 sibling, 1 reply; 4+ messages in thread
From: Sergey Senozhatsky @ 2015-03-23 13:26 UTC (permalink / raw)
To: Andrew Morton, Minchan Kim
Cc: Nitin Gupta, linux-mm, linux-kernel, Sergey Senozhatsky,
Sergey Senozhatsky
Do not synchronize rcu in zs_compact(). Neither zsmalloc not
zram use rcu.
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
---
mm/zsmalloc.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index cf4f074..d1bbb04 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1776,8 +1776,6 @@ unsigned long zs_compact(struct zs_pool *pool)
nr_migrated += __zs_compact(pool, class);
}
- synchronize_rcu();
-
return nr_migrated;
}
EXPORT_SYMBOL_GPL(zs_compact);
--
2.3.3.262.ge80e85a
--
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 1/2] zsmalloc: remove synchronize_rcu from zs_compact()
2015-03-23 13:26 ` [PATCH 1/2] zsmalloc: remove synchronize_rcu from zs_compact() Sergey Senozhatsky
@ 2015-03-25 15:09 ` Minchan Kim
0 siblings, 0 replies; 4+ messages in thread
From: Minchan Kim @ 2015-03-25 15:09 UTC (permalink / raw)
To: Sergey Senozhatsky
Cc: Andrew Morton, Nitin Gupta, linux-mm, linux-kernel, Sergey Senozhatsky
On Mon, Mar 23, 2015 at 10:26:38PM +0900, Sergey Senozhatsky wrote:
> Do not synchronize rcu in zs_compact(). Neither zsmalloc not
> zram use rcu.
>
> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
--
Kind regards,
Minchan Kim
--
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
* [PATCH 2/2] zsmalloc: remove extra cond_resched() in __zs_compact
2015-03-23 13:26 [PATCH 0/2] mm/zsmalloc: trivial clean up Sergey Senozhatsky
2015-03-23 13:26 ` [PATCH 1/2] zsmalloc: remove synchronize_rcu from zs_compact() Sergey Senozhatsky
@ 2015-03-23 13:26 ` Sergey Senozhatsky
1 sibling, 0 replies; 4+ messages in thread
From: Sergey Senozhatsky @ 2015-03-23 13:26 UTC (permalink / raw)
To: Andrew Morton, Minchan Kim
Cc: Nitin Gupta, linux-mm, linux-kernel, Sergey Senozhatsky,
Sergey Senozhatsky
Do not perform cond_resched() before the busy compaction
loop in __zs_compact(), because this loop does it when
needed.
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
---
mm/zsmalloc.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index d1bbb04..d920e8b 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1715,8 +1715,6 @@ static unsigned long __zs_compact(struct zs_pool *pool,
struct page *dst_page = NULL;
unsigned long nr_total_migrated = 0;
- cond_resched();
-
spin_lock(&class->lock);
while ((src_page = isolate_source_page(class))) {
--
2.3.3.262.ge80e85a
--
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
end of thread, other threads:[~2015-03-25 15:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-23 13:26 [PATCH 0/2] mm/zsmalloc: trivial clean up Sergey Senozhatsky
2015-03-23 13:26 ` [PATCH 1/2] zsmalloc: remove synchronize_rcu from zs_compact() Sergey Senozhatsky
2015-03-25 15:09 ` Minchan Kim
2015-03-23 13:26 ` [PATCH 2/2] zsmalloc: remove extra cond_resched() in __zs_compact Sergey Senozhatsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).