All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/compaction: reset compaction scanner positions
@ 2015-03-21 11:58 ` Gioh Kim
  0 siblings, 0 replies; 6+ messages in thread
From: Gioh Kim @ 2015-03-21 11:58 UTC (permalink / raw)
  To: akpm, vbabka, rientjes, iamjoonsoo.kim
  Cc: mgorman, linux-mm, linux-kernel, gunho.lee, Gioh Kim, Gioh Kim

When the compaction is activated via /proc/sys/vm/compact_memory
it would better scan the whole zone.
And some platform, for instance ARM, has the start_pfn of a zone is zero.
Therefore the first try to compaction via /proc doesn't work.
It needs to force to reset compaction scanner position at first.

Signed-off-by: Gioh Kim <gioh.kim@lge.c>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
---
 mm/compaction.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/mm/compaction.c b/mm/compaction.c
index 8c0d945..ccf48ce 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1587,6 +1587,14 @@ static void __compact_pgdat(pg_data_t *pgdat, struct compact_control *cc)
 		INIT_LIST_HEAD(&cc->freepages);
 		INIT_LIST_HEAD(&cc->migratepages);
 
+		/*
+		 * When called via /proc/sys/vm/compact_memory
+		 * this makes sure we compact the whole zone regardless of
+		 * cached scanner positions.
+		 */
+		if (cc->order == -1)
+			__reset_isolation_suitable(zone);
+
 		if (cc->order == -1 || !compaction_deferred(zone, cc->order))
 			compact_zone(zone, cc);
 
-- 
1.7.9.5


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

* [PATCH] mm/compaction: reset compaction scanner positions
@ 2015-03-21 11:58 ` Gioh Kim
  0 siblings, 0 replies; 6+ messages in thread
From: Gioh Kim @ 2015-03-21 11:58 UTC (permalink / raw)
  To: akpm, vbabka, rientjes, iamjoonsoo.kim
  Cc: mgorman, linux-mm, linux-kernel, gunho.lee, Gioh Kim

When the compaction is activated via /proc/sys/vm/compact_memory
it would better scan the whole zone.
And some platform, for instance ARM, has the start_pfn of a zone is zero.
Therefore the first try to compaction via /proc doesn't work.
It needs to force to reset compaction scanner position at first.

Signed-off-by: Gioh Kim <gioh.kim@lge.c>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
---
 mm/compaction.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/mm/compaction.c b/mm/compaction.c
index 8c0d945..ccf48ce 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1587,6 +1587,14 @@ static void __compact_pgdat(pg_data_t *pgdat, struct compact_control *cc)
 		INIT_LIST_HEAD(&cc->freepages);
 		INIT_LIST_HEAD(&cc->migratepages);
 
+		/*
+		 * When called via /proc/sys/vm/compact_memory
+		 * this makes sure we compact the whole zone regardless of
+		 * cached scanner positions.
+		 */
+		if (cc->order == -1)
+			__reset_isolation_suitable(zone);
+
 		if (cc->order == -1 || !compaction_deferred(zone, cc->order))
 			compact_zone(zone, cc);
 
-- 
1.7.9.5

--
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] 6+ messages in thread

* Re: [PATCH] mm/compaction: reset compaction scanner positions
  2015-03-21 11:58 ` Gioh Kim
@ 2015-03-23 23:16   ` David Rientjes
  -1 siblings, 0 replies; 6+ messages in thread
From: David Rientjes @ 2015-03-23 23:16 UTC (permalink / raw)
  To: Gioh Kim
  Cc: akpm, vbabka, iamjoonsoo.kim, mgorman, linux-mm, linux-kernel,
	gunho.lee, Gioh Kim

On Sat, 21 Mar 2015, Gioh Kim wrote:

> When the compaction is activated via /proc/sys/vm/compact_memory
> it would better scan the whole zone.
> And some platform, for instance ARM, has the start_pfn of a zone is zero.
> Therefore the first try to compaction via /proc doesn't work.
> It needs to force to reset compaction scanner position at first.
> 
> Signed-off-by: Gioh Kim <gioh.kim@lge.c>

That shouldn't be a valid email address.

> Acked-by: Vlastimil Babka <vbabka@suse.cz>

Acked-by: David Rientjes <rientjes@google.com>

I was thinking that maybe this would be better handled as part of the 
comapct_zone() logic, i.e. set cc->free_pfn and cc->migrate_pfn based on a 
helper function that understands cc->order == -1 should compact the entire 
zone.  However, after scanning the entire zone as a result of this write, 
the existing cached pfns probably don't matter anymore.  So this seems 
fine.

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

* Re: [PATCH] mm/compaction: reset compaction scanner positions
@ 2015-03-23 23:16   ` David Rientjes
  0 siblings, 0 replies; 6+ messages in thread
From: David Rientjes @ 2015-03-23 23:16 UTC (permalink / raw)
  To: Gioh Kim
  Cc: akpm, vbabka, iamjoonsoo.kim, mgorman, linux-mm, linux-kernel, gunho.lee

On Sat, 21 Mar 2015, Gioh Kim wrote:

> When the compaction is activated via /proc/sys/vm/compact_memory
> it would better scan the whole zone.
> And some platform, for instance ARM, has the start_pfn of a zone is zero.
> Therefore the first try to compaction via /proc doesn't work.
> It needs to force to reset compaction scanner position at first.
> 
> Signed-off-by: Gioh Kim <gioh.kim@lge.c>

That shouldn't be a valid email address.

> Acked-by: Vlastimil Babka <vbabka@suse.cz>

Acked-by: David Rientjes <rientjes@google.com>

I was thinking that maybe this would be better handled as part of the 
comapct_zone() logic, i.e. set cc->free_pfn and cc->migrate_pfn based on a 
helper function that understands cc->order == -1 should compact the entire 
zone.  However, after scanning the entire zone as a result of this write, 
the existing cached pfns probably don't matter anymore.  So this seems 
fine.

--
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] 6+ messages in thread

* Re: [PATCH] mm/compaction: reset compaction scanner positions
  2015-03-23 23:16   ` David Rientjes
@ 2015-03-24  1:23     ` Gioh Kim
  -1 siblings, 0 replies; 6+ messages in thread
From: Gioh Kim @ 2015-03-24  1:23 UTC (permalink / raw)
  To: David Rientjes
  Cc: akpm, vbabka, iamjoonsoo.kim, mgorman, linux-mm, linux-kernel,
	gunho.lee, Gioh Kim



2015-03-24 오전 8:16에 David Rientjes 이(가) 쓴 글:
> On Sat, 21 Mar 2015, Gioh Kim wrote:
>
>> When the compaction is activated via /proc/sys/vm/compact_memory
>> it would better scan the whole zone.
>> And some platform, for instance ARM, has the start_pfn of a zone is zero.
>> Therefore the first try to compaction via /proc doesn't work.
>> It needs to force to reset compaction scanner position at first.
>>
>> Signed-off-by: Gioh Kim <gioh.kim@lge.c>
>
> That shouldn't be a valid email address.

It's my fault. I'm going to send patch again.

>
>> Acked-by: Vlastimil Babka <vbabka@suse.cz>
>
> Acked-by: David Rientjes <rientjes@google.com>
>
> I was thinking that maybe this would be better handled as part of the
> comapct_zone() logic, i.e. set cc->free_pfn and cc->migrate_pfn based on a
> helper function that understands cc->order == -1 should compact the entire
> zone.  However, after scanning the entire zone as a result of this write,
> the existing cached pfns probably don't matter anymore.  So this seems
> fine.
>

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

* Re: [PATCH] mm/compaction: reset compaction scanner positions
@ 2015-03-24  1:23     ` Gioh Kim
  0 siblings, 0 replies; 6+ messages in thread
From: Gioh Kim @ 2015-03-24  1:23 UTC (permalink / raw)
  To: David Rientjes
  Cc: akpm, vbabka, iamjoonsoo.kim, mgorman, linux-mm, linux-kernel,
	gunho.lee, Gioh Kim



2015-03-24 i??i ? 8:16i?? David Rientjes i?'(e??) i?' e,?:
> On Sat, 21 Mar 2015, Gioh Kim wrote:
>
>> When the compaction is activated via /proc/sys/vm/compact_memory
>> it would better scan the whole zone.
>> And some platform, for instance ARM, has the start_pfn of a zone is zero.
>> Therefore the first try to compaction via /proc doesn't work.
>> It needs to force to reset compaction scanner position at first.
>>
>> Signed-off-by: Gioh Kim <gioh.kim@lge.c>
>
> That shouldn't be a valid email address.

It's my fault. I'm going to send patch again.

>
>> Acked-by: Vlastimil Babka <vbabka@suse.cz>
>
> Acked-by: David Rientjes <rientjes@google.com>
>
> I was thinking that maybe this would be better handled as part of the
> comapct_zone() logic, i.e. set cc->free_pfn and cc->migrate_pfn based on a
> helper function that understands cc->order == -1 should compact the entire
> zone.  However, after scanning the entire zone as a result of this write,
> the existing cached pfns probably don't matter anymore.  So this seems
> fine.
>

--
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] 6+ messages in thread

end of thread, other threads:[~2015-03-24  1:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-21 11:58 [PATCH] mm/compaction: reset compaction scanner positions Gioh Kim
2015-03-21 11:58 ` Gioh Kim
2015-03-23 23:16 ` David Rientjes
2015-03-23 23:16   ` David Rientjes
2015-03-24  1:23   ` Gioh Kim
2015-03-24  1:23     ` Gioh 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.