All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xishi Qiu <qiuxishi@huawei.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Vlastimil Babka <vbabka@suse.cz>,
	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: [PATCH] mm: init gfp mask in kcompactd_do_work()
Date: Mon, 10 Oct 2016 11:35:37 +0800	[thread overview]
Message-ID: <57FB0C89.3040304@huawei.com> (raw)

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>

WARNING: multiple messages have this Message-ID (diff)
From: Xishi Qiu <qiuxishi@huawei.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Vlastimil Babka <vbabka@suse.cz>,
	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: [PATCH] mm: init gfp mask in kcompactd_do_work()
Date: Mon, 10 Oct 2016 11:35:37 +0800	[thread overview]
Message-ID: <57FB0C89.3040304@huawei.com> (raw)

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

             reply	other threads:[~2016-10-10  3:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-10  3:35 Xishi Qiu [this message]
2016-10-10  3:35 ` [PATCH] mm: init gfp mask in kcompactd_do_work() 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

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=57FB0C89.3040304@huawei.com \
    --to=qiuxishi@huawei.com \
    --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=rientjes@google.com \
    --cc=vbabka@suse.cz \
    --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 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.