linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Xishi Qiu <qiuxishi@huawei.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@techsingularity.net>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Michal Hocko <mhocko@suse.com>, Minchan Kim <minchan@kernel.org>,
	David Rientjes <rientjes@google.com>,
	Yisheng Xie <xieyisheng1@huawei.com>
Cc: Linux MM <linux-mm@kvack.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: init gfp mask in kcompactd_do_work()
Date: Mon, 10 Oct 2016 08:40:14 +0200	[thread overview]
Message-ID: <982e8902-18ac-eaa2-214a-87e68ce75732@suse.cz> (raw)
In-Reply-To: <57FB0C89.3040304@huawei.com>

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>

  reply	other threads:[~2016-10-10  6:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-10  3:35 Xishi Qiu
2016-10-10  6:40 ` Vlastimil Babka [this message]
2016-10-10  8:16   ` Xishi Qiu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=982e8902-18ac-eaa2-214a-87e68ce75732@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@suse.com \
    --cc=minchan@kernel.org \
    --cc=qiuxishi@huawei.com \
    --cc=rientjes@google.com \
    --cc=xieyisheng1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox