All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: init gfp mask in kcompactd_do_work()
@ 2016-10-10  3:35 ` Xishi Qiu
  0 siblings, 0 replies; 6+ messages in thread
From: Xishi Qiu @ 2016-10-10  3:35 UTC (permalink / raw)
  To: Andrew Morton, Vlastimil Babka, Mel Gorman, Joonsoo Kim,
	Michal Hocko, Minchan Kim, David Rientjes, Yisheng Xie
  Cc: Linux MM, LKML

We will use gfp_mask in the following path, but it's not init.

kcompactd_do_work
	compact_zone
		gfpflags_to_migratetype

However if not init, gfp_mask is always 0, and the result of
gfpflags_to_migratetype(0) and gfpflags_to_migratetype(GFP_KERNEL)
are the same, but it's a little confusion, so init it first.

Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
---
 mm/compaction.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index 9affb29..4b9a9d1 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1895,10 +1895,10 @@ static void kcompactd_do_work(pg_data_t *pgdat)
 	struct zone *zone;
 	struct compact_control cc = {
 		.order = pgdat->kcompactd_max_order,
+		.gfp_mask = GFP_KERNEL,
 		.classzone_idx = pgdat->kcompactd_classzone_idx,
 		.mode = MIGRATE_SYNC_LIGHT,
 		.ignore_skip_hint = true,
-
 	};
 	bool success = false;
 
-- 
1.8.3.1

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

* [PATCH] mm: init gfp mask in kcompactd_do_work()
@ 2016-10-10  3:35 ` Xishi Qiu
  0 siblings, 0 replies; 6+ messages in thread
From: Xishi Qiu @ 2016-10-10  3:35 UTC (permalink / raw)
  To: Andrew Morton, Vlastimil Babka, Mel Gorman, Joonsoo Kim,
	Michal Hocko, Minchan Kim, David Rientjes, Yisheng Xie
  Cc: Linux MM, LKML

We will use gfp_mask in the following path, but it's not init.

kcompactd_do_work
	compact_zone
		gfpflags_to_migratetype

However if not init, gfp_mask is always 0, and the result of
gfpflags_to_migratetype(0) and gfpflags_to_migratetype(GFP_KERNEL)
are the same, but it's a little confusion, so init it first.

Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
---
 mm/compaction.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index 9affb29..4b9a9d1 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1895,10 +1895,10 @@ static void kcompactd_do_work(pg_data_t *pgdat)
 	struct zone *zone;
 	struct compact_control cc = {
 		.order = pgdat->kcompactd_max_order,
+		.gfp_mask = GFP_KERNEL,
 		.classzone_idx = pgdat->kcompactd_classzone_idx,
 		.mode = MIGRATE_SYNC_LIGHT,
 		.ignore_skip_hint = true,
-
 	};
 	bool success = false;
 
-- 
1.8.3.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] 6+ messages in thread

* Re: [PATCH] mm: init gfp mask in kcompactd_do_work()
  2016-10-10  3:35 ` Xishi Qiu
@ 2016-10-10  6:40   ` Vlastimil Babka
  -1 siblings, 0 replies; 6+ messages in thread
From: Vlastimil Babka @ 2016-10-10  6:40 UTC (permalink / raw)
  To: Xishi Qiu, Andrew Morton, Mel Gorman, Joonsoo Kim, Michal Hocko,
	Minchan Kim, David Rientjes, Yisheng Xie
  Cc: Linux MM, LKML

On 10/10/2016 05:35 AM, Xishi Qiu wrote:
> We will use gfp_mask in the following path, but it's not init.
>
> kcompactd_do_work
> 	compact_zone
> 		gfpflags_to_migratetype
>
> However if not init, gfp_mask is always 0, and the result of
> gfpflags_to_migratetype(0) and gfpflags_to_migratetype(GFP_KERNEL)
> are the same, but it's a little confusion, so init it first.

Michal already did this as part of his patch, as it was needed to avoid 
wrongly restricting kcompactd to anonymous pages:

http://lkml.kernel.org/r/<20161007065019.GA18439@dhcp22.suse.cz>

> Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
> ---
>  mm/compaction.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 9affb29..4b9a9d1 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -1895,10 +1895,10 @@ static void kcompactd_do_work(pg_data_t *pgdat)
>  	struct zone *zone;
>  	struct compact_control cc = {
>  		.order = pgdat->kcompactd_max_order,
> +		.gfp_mask = GFP_KERNEL,
>  		.classzone_idx = pgdat->kcompactd_classzone_idx,
>  		.mode = MIGRATE_SYNC_LIGHT,
>  		.ignore_skip_hint = true,
> -
>  	};
>  	bool success = false;
>
>

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

* Re: [PATCH] mm: init gfp mask in kcompactd_do_work()
@ 2016-10-10  6:40   ` Vlastimil Babka
  0 siblings, 0 replies; 6+ messages in thread
From: Vlastimil Babka @ 2016-10-10  6:40 UTC (permalink / raw)
  To: Xishi Qiu, Andrew Morton, Mel Gorman, Joonsoo Kim, Michal Hocko,
	Minchan Kim, David Rientjes, Yisheng Xie
  Cc: Linux MM, LKML

On 10/10/2016 05:35 AM, Xishi Qiu wrote:
> We will use gfp_mask in the following path, but it's not init.
>
> kcompactd_do_work
> 	compact_zone
> 		gfpflags_to_migratetype
>
> However if not init, gfp_mask is always 0, and the result of
> gfpflags_to_migratetype(0) and gfpflags_to_migratetype(GFP_KERNEL)
> are the same, but it's a little confusion, so init it first.

Michal already did this as part of his patch, as it was needed to avoid 
wrongly restricting kcompactd to anonymous pages:

http://lkml.kernel.org/r/<20161007065019.GA18439@dhcp22.suse.cz>

> Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
> ---
>  mm/compaction.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 9affb29..4b9a9d1 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -1895,10 +1895,10 @@ static void kcompactd_do_work(pg_data_t *pgdat)
>  	struct zone *zone;
>  	struct compact_control cc = {
>  		.order = pgdat->kcompactd_max_order,
> +		.gfp_mask = GFP_KERNEL,
>  		.classzone_idx = pgdat->kcompactd_classzone_idx,
>  		.mode = MIGRATE_SYNC_LIGHT,
>  		.ignore_skip_hint = true,
> -
>  	};
>  	bool success = false;
>
>

--
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: init gfp mask in kcompactd_do_work()
  2016-10-10  6:40   ` Vlastimil Babka
@ 2016-10-10  8:16     ` Xishi Qiu
  -1 siblings, 0 replies; 6+ messages in thread
From: Xishi Qiu @ 2016-10-10  8:16 UTC (permalink / raw)
  To: Vlastimil Babka
  Cc: Andrew Morton, Mel Gorman, Joonsoo Kim, Michal Hocko,
	Minchan Kim, David Rientjes, Yisheng Xie, Linux MM, LKML

On 2016/10/10 14:40, Vlastimil Babka wrote:

> On 10/10/2016 05:35 AM, Xishi Qiu wrote:
>> We will use gfp_mask in the following path, but it's not init.
>>
>> kcompactd_do_work
>>     compact_zone
>>         gfpflags_to_migratetype
>>
>> However if not init, gfp_mask is always 0, and the result of
>> gfpflags_to_migratetype(0) and gfpflags_to_migratetype(GFP_KERNEL)
>> are the same, but it's a little confusion, so init it first.
> 
> Michal already did this as part of his patch, as it was needed to avoid wrongly restricting kcompactd to anonymous pages:
> 
> http://lkml.kernel.org/r/<20161007065019.GA18439@dhcp22.suse.cz>
> 

Oh yes, I missed your discussion.

Thanks,
Xishi Qiu

>> Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
>> ---
>>  mm/compaction.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/mm/compaction.c b/mm/compaction.c
>> index 9affb29..4b9a9d1 100644
>> --- a/mm/compaction.c
>> +++ b/mm/compaction.c
>> @@ -1895,10 +1895,10 @@ static void kcompactd_do_work(pg_data_t *pgdat)
>>      struct zone *zone;
>>      struct compact_control cc = {
>>          .order = pgdat->kcompactd_max_order,
>> +        .gfp_mask = GFP_KERNEL,
>>          .classzone_idx = pgdat->kcompactd_classzone_idx,
>>          .mode = MIGRATE_SYNC_LIGHT,
>>          .ignore_skip_hint = true,
>> -
>>      };
>>      bool success = false;
>>
>>
> 
> 
> .
> 

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

* Re: [PATCH] mm: init gfp mask in kcompactd_do_work()
@ 2016-10-10  8:16     ` Xishi Qiu
  0 siblings, 0 replies; 6+ messages in thread
From: Xishi Qiu @ 2016-10-10  8:16 UTC (permalink / raw)
  To: Vlastimil Babka
  Cc: Andrew Morton, Mel Gorman, Joonsoo Kim, Michal Hocko,
	Minchan Kim, David Rientjes, Yisheng Xie, Linux MM, LKML

On 2016/10/10 14:40, Vlastimil Babka wrote:

> On 10/10/2016 05:35 AM, Xishi Qiu wrote:
>> We will use gfp_mask in the following path, but it's not init.
>>
>> kcompactd_do_work
>>     compact_zone
>>         gfpflags_to_migratetype
>>
>> However if not init, gfp_mask is always 0, and the result of
>> gfpflags_to_migratetype(0) and gfpflags_to_migratetype(GFP_KERNEL)
>> are the same, but it's a little confusion, so init it first.
> 
> Michal already did this as part of his patch, as it was needed to avoid wrongly restricting kcompactd to anonymous pages:
> 
> http://lkml.kernel.org/r/<20161007065019.GA18439@dhcp22.suse.cz>
> 

Oh yes, I missed your discussion.

Thanks,
Xishi Qiu

>> Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
>> ---
>>  mm/compaction.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/mm/compaction.c b/mm/compaction.c
>> index 9affb29..4b9a9d1 100644
>> --- a/mm/compaction.c
>> +++ b/mm/compaction.c
>> @@ -1895,10 +1895,10 @@ static void kcompactd_do_work(pg_data_t *pgdat)
>>      struct zone *zone;
>>      struct compact_control cc = {
>>          .order = pgdat->kcompactd_max_order,
>> +        .gfp_mask = GFP_KERNEL,
>>          .classzone_idx = pgdat->kcompactd_classzone_idx,
>>          .mode = MIGRATE_SYNC_LIGHT,
>>          .ignore_skip_hint = true,
>> -
>>      };
>>      bool success = false;
>>
>>
> 
> 
> .
> 



--
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:[~2016-10-10  8:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-10  3:35 [PATCH] mm: init gfp mask in kcompactd_do_work() Xishi Qiu
2016-10-10  3:35 ` Xishi Qiu
2016-10-10  6:40 ` Vlastimil Babka
2016-10-10  6:40   ` Vlastimil Babka
2016-10-10  8:16   ` Xishi Qiu
2016-10-10  8:16     ` Xishi Qiu

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.