* [PATCH] mm/compaction: restore COMPACT_CLUSTER_MAX to 32
@ 2015-12-03 4:11 Joonsoo Kim
2015-12-08 1:00 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Joonsoo Kim @ 2015-12-03 4:11 UTC (permalink / raw)
To: Andrew Morton
Cc: Vlastimil Babka, Mel Gorman, David Rientjes, linux-kernel,
linux-mm, Joonsoo Kim
Until now, COMPACT_CLUSTER_MAX is defined as SWAP_CLUSTER_MAX.
Commit ("mm: increase SWAP_CLUSTER_MAX to batch TLB flushes")
changes SWAP_CLUSTER_MAX from 32 to 256 to improve tlb flush performance
so COMPACT_CLUSTER_MAX is also changed to 256. But, it has
no justification on compaction-side and I think that loss is more than
benefit.
One example is that migration scanner would isolates and migrates
too many pages unnecessarily with 256 COMPACT_CLUSTER_MAX. It may be
enough to migrate 4 pages in order to make order-2 page, but, now,
compaction will migrate 256 pages.
To reduce this unneeded overhead, this patch restores
COMPACT_CLUSTER_MAX to 32.
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
---
include/linux/swap.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/swap.h b/include/linux/swap.h
index d08feef..31eb343 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -155,7 +155,7 @@ enum {
};
#define SWAP_CLUSTER_MAX 256UL
-#define COMPACT_CLUSTER_MAX SWAP_CLUSTER_MAX
+#define COMPACT_CLUSTER_MAX 32UL
/*
* Ratio between zone->managed_pages and the "gap" that above the per-zone
--
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 [flat|nested] 3+ messages in thread
* Re: [PATCH] mm/compaction: restore COMPACT_CLUSTER_MAX to 32
2015-12-03 4:11 [PATCH] mm/compaction: restore COMPACT_CLUSTER_MAX to 32 Joonsoo Kim
@ 2015-12-08 1:00 ` Andrew Morton
2015-12-08 9:45 ` Mel Gorman
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2015-12-08 1:00 UTC (permalink / raw)
To: Joonsoo Kim
Cc: Vlastimil Babka, Mel Gorman, David Rientjes, linux-kernel,
linux-mm, Joonsoo Kim
On Thu, 3 Dec 2015 13:11:40 +0900 Joonsoo Kim <js1304@gmail.com> wrote:
> Until now, COMPACT_CLUSTER_MAX is defined as SWAP_CLUSTER_MAX.
> Commit ("mm: increase SWAP_CLUSTER_MAX to batch TLB flushes")
> changes SWAP_CLUSTER_MAX from 32 to 256 to improve tlb flush performance
> so COMPACT_CLUSTER_MAX is also changed to 256.
"mm: increase SWAP_CLUSTER_MAX to batch TLB flushes" has been in limbo
for quite a while. Because it has been unclear whether the patch's
benefits exceed its costs+risks.
We should make a decision here - either do the appropriate testing or
drop the patch.
> But, it has
> no justification on compaction-side and I think that loss is more than
> benefit.
>
> One example is that migration scanner would isolates and migrates
> too many pages unnecessarily with 256 COMPACT_CLUSTER_MAX. It may be
> enough to migrate 4 pages in order to make order-2 page, but, now,
> compaction will migrate 256 pages.
>
> To reduce this unneeded overhead, this patch restores
> COMPACT_CLUSTER_MAX to 32.
>
> ...
>
> --- a/include/linux/swap.h
> +++ b/include/linux/swap.h
> @@ -155,7 +155,7 @@ enum {
> };
>
> #define SWAP_CLUSTER_MAX 256UL
> -#define COMPACT_CLUSTER_MAX SWAP_CLUSTER_MAX
> +#define COMPACT_CLUSTER_MAX 32UL
>
> /*
> * Ratio between zone->managed_pages and the "gap" that above the per-zone
--
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] 3+ messages in thread
* Re: [PATCH] mm/compaction: restore COMPACT_CLUSTER_MAX to 32
2015-12-08 1:00 ` Andrew Morton
@ 2015-12-08 9:45 ` Mel Gorman
0 siblings, 0 replies; 3+ messages in thread
From: Mel Gorman @ 2015-12-08 9:45 UTC (permalink / raw)
To: Andrew Morton
Cc: Joonsoo Kim, Vlastimil Babka, David Rientjes, linux-kernel,
linux-mm, Joonsoo Kim
On Mon, Dec 07, 2015 at 05:00:41PM -0800, Andrew Morton wrote:
> On Thu, 3 Dec 2015 13:11:40 +0900 Joonsoo Kim <js1304@gmail.com> wrote:
>
> > Until now, COMPACT_CLUSTER_MAX is defined as SWAP_CLUSTER_MAX.
> > Commit ("mm: increase SWAP_CLUSTER_MAX to batch TLB flushes")
> > changes SWAP_CLUSTER_MAX from 32 to 256 to improve tlb flush performance
> > so COMPACT_CLUSTER_MAX is also changed to 256.
>
> "mm: increase SWAP_CLUSTER_MAX to batch TLB flushes" has been in limbo
> for quite a while. Because it has been unclear whether the patch's
> benefits exceed its costs+risks.
>
> We should make a decision here - either do the appropriate testing or
> drop the patch.
>
At this point, drop it. The benefits that apply to some corner cases are
marginal but the concerns about potentially isolating and reclaiming too
much persist.
--
Mel Gorman
SUSE Labs
--
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] 3+ messages in thread
end of thread, other threads:[~2015-12-08 9:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-03 4:11 [PATCH] mm/compaction: restore COMPACT_CLUSTER_MAX to 32 Joonsoo Kim
2015-12-08 1:00 ` Andrew Morton
2015-12-08 9:45 ` Mel Gorman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox