All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pengfei Li <lpf.vector@gmail.com>
To: akpm@linux-foundation.org
Cc: mgorman@techsingularity.net, mhocko@suse.com, vbabka@suse.cz,
	cai@lca.pw, aryabinin@virtuozzo.com, osalvador@suse.de,
	rostedt@goodmis.org, mingo@redhat.com,
	pavel.tatashin@microsoft.com, rppt@linux.ibm.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Pengfei Li <lpf.vector@gmail.com>
Subject: [PATCH 09/10] mm/compaction: use unsigned int for "kcompactd_max_order" in struct pglist_data
Date: Fri, 26 Jul 2019 02:42:52 +0800	[thread overview]
Message-ID: <20190725184253.21160-10-lpf.vector@gmail.com> (raw)
In-Reply-To: <20190725184253.21160-1-lpf.vector@gmail.com>

Because "kcompactd_max_order" will never be negative, so just
make it unsigned int.

Signed-off-by: Pengfei Li <lpf.vector@gmail.com>
---
 include/linux/compaction.h | 6 ++++--
 include/linux/mmzone.h     | 2 +-
 mm/compaction.c            | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/include/linux/compaction.h b/include/linux/compaction.h
index a8049d582265..1b296de6efef 100644
--- a/include/linux/compaction.h
+++ b/include/linux/compaction.h
@@ -175,7 +175,8 @@ bool compaction_zonelist_suitable(struct alloc_context *ac,
 
 extern int kcompactd_run(int nid);
 extern void kcompactd_stop(int nid);
-extern void wakeup_kcompactd(pg_data_t *pgdat, int order, int classzone_idx);
+extern void wakeup_kcompactd(pg_data_t *pgdat, unsigned int order,
+				int classzone_idx);
 
 #else
 static inline void reset_isolation_suitable(pg_data_t *pgdat)
@@ -220,7 +221,8 @@ static inline void kcompactd_stop(int nid)
 {
 }
 
-static inline void wakeup_kcompactd(pg_data_t *pgdat, int order, int classzone_idx)
+static inline void wakeup_kcompactd(pg_data_t *pgdat, unsigned int order,
+					int classzone_idx)
 {
 }
 
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 0947e7cb4214..60bebdf47661 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -723,7 +723,7 @@ typedef struct pglist_data {
 	int kswapd_failures;		/* Number of 'reclaimed == 0' runs */
 
 #ifdef CONFIG_COMPACTION
-	int kcompactd_max_order;
+	unsigned int kcompactd_max_order;
 	enum zone_type kcompactd_classzone_idx;
 	wait_queue_head_t kcompactd_wait;
 	struct task_struct *kcompactd;
diff --git a/mm/compaction.c b/mm/compaction.c
index aad638ad2cc6..909ead244cff 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -2607,7 +2607,7 @@ static void kcompactd_do_work(pg_data_t *pgdat)
 		pgdat->kcompactd_classzone_idx = pgdat->nr_zones - 1;
 }
 
-void wakeup_kcompactd(pg_data_t *pgdat, int order, int classzone_idx)
+void wakeup_kcompactd(pg_data_t *pgdat, unsigned int order, int classzone_idx)
 {
 	if (!order)
 		return;
-- 
2.21.0


  parent reply	other threads:[~2019-07-25 18:44 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-25 18:42 [PATCH 00/10] make "order" unsigned int Pengfei Li
2019-07-25 18:42 ` [PATCH 01/10] mm/page_alloc: use unsigned int for "order" in should_compact_retry() Pengfei Li
2019-07-25 18:58   ` Matthew Wilcox
2019-07-25 23:21     ` Pengfei Li
2019-07-25 23:21       ` Pengfei Li
2019-07-25 18:42 ` [PATCH 02/10] mm/page_alloc: use unsigned int for "order" in __rmqueue_fallback() Pengfei Li
2019-07-26  9:36   ` Rasmus Villemoes
2019-07-27  2:34     ` Pengfei Li
2019-07-27  2:34       ` Pengfei Li
2019-07-25 18:42 ` [PATCH 03/10] mm/page_alloc: use unsigned int for "order" in should_compact_retry() Pengfei Li
2019-07-25 18:42 ` [PATCH 04/10] mm/page_alloc: remove never used "order" in alloc_contig_range() Pengfei Li
2019-07-25 18:42 ` [PATCH 05/10] mm/compaction: make "order" and "search_order" unsigned int in struct compact_control Pengfei Li
2019-07-25 18:42 ` [PATCH 06/10] mm/compaction: make "order" unsigned int in compaction.c Pengfei Li
2019-07-25 18:42 ` [PATCH 07/10] trace/events/compaction: make "order" unsigned int Pengfei Li
2019-07-25 18:42 ` [PATCH 08/10] mm/compaction: use unsigned int for "compact_order_failed" in struct zone Pengfei Li
2019-07-25 18:42 ` Pengfei Li [this message]
2019-07-25 18:42 ` [PATCH 10/10] mm/vmscan: use unsigned int for "kswapd_order" in struct pglist_data Pengfei Li
2019-07-25 18:52 ` [PATCH 00/10] make "order" unsigned int Qian Cai
2019-07-25 18:52   ` Qian Cai
2019-07-25 23:48   ` Pengfei Li
2019-07-25 23:48     ` Pengfei Li
2019-07-26  7:12     ` Michal Hocko
2019-07-27 17:25       ` Pengfei Li
2019-07-27 17:25         ` Pengfei Li
2019-07-26  7:26 ` Mel Gorman
2019-07-27 16:44   ` Pengfei Li
2019-07-27 16:44     ` Pengfei Li
2019-07-29  8:34     ` Mel Gorman
2019-07-30  5:53       ` Pengfei Li
2019-07-30  5:53         ` Pengfei Li

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=20190725184253.21160-10-lpf.vector@gmail.com \
    --to=lpf.vector@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=aryabinin@virtuozzo.com \
    --cc=cai@lca.pw \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@suse.com \
    --cc=mingo@redhat.com \
    --cc=osalvador@suse.de \
    --cc=pavel.tatashin@microsoft.com \
    --cc=rostedt@goodmis.org \
    --cc=rppt@linux.ibm.com \
    --cc=vbabka@suse.cz \
    /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.