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 01/10] mm/page_alloc: use unsigned int for "order" in should_compact_retry()
Date: Fri, 26 Jul 2019 02:42:44 +0800	[thread overview]
Message-ID: <20190725184253.21160-2-lpf.vector@gmail.com> (raw)
In-Reply-To: <20190725184253.21160-1-lpf.vector@gmail.com>

Like another should_compact_retry(), use unsigned int for "order".
And modify trace_compact_retry() accordingly.

Signed-off-by: Pengfei Li <lpf.vector@gmail.com>
---
 include/trace/events/oom.h | 6 +++---
 mm/page_alloc.c            | 7 +++----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/include/trace/events/oom.h b/include/trace/events/oom.h
index 26a11e4a2c36..b7fa989349c7 100644
--- a/include/trace/events/oom.h
+++ b/include/trace/events/oom.h
@@ -154,7 +154,7 @@ TRACE_EVENT(skip_task_reaping,
 #ifdef CONFIG_COMPACTION
 TRACE_EVENT(compact_retry,
 
-	TP_PROTO(int order,
+	TP_PROTO(unsigned int order,
 		enum compact_priority priority,
 		enum compact_result result,
 		int retries,
@@ -164,7 +164,7 @@ TRACE_EVENT(compact_retry,
 	TP_ARGS(order, priority, result, retries, max_retries, ret),
 
 	TP_STRUCT__entry(
-		__field(	int, order)
+		__field(unsigned int, order)
 		__field(	int, priority)
 		__field(	int, result)
 		__field(	int, retries)
@@ -181,7 +181,7 @@ TRACE_EVENT(compact_retry,
 		__entry->ret = ret;
 	),
 
-	TP_printk("order=%d priority=%s compaction_result=%s retries=%d max_retries=%d should_retry=%d",
+	TP_printk("order=%u priority=%s compaction_result=%s retries=%d max_retries=%d should_retry=%d",
 			__entry->order,
 			__print_symbolic(__entry->priority, COMPACTION_PRIORITY),
 			__print_symbolic(__entry->result, COMPACTION_FEEDBACK),
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 272c6de1bf4e..75c18f4fd66a 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3940,10 +3940,9 @@ __alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order,
 }
 
 static inline bool
-should_compact_retry(struct alloc_context *ac, int order, int alloc_flags,
-		     enum compact_result compact_result,
-		     enum compact_priority *compact_priority,
-		     int *compaction_retries)
+should_compact_retry(struct alloc_context *ac, unsigned int order,
+	int alloc_flags, enum compact_result compact_result,
+	enum compact_priority *compact_priority, int *compaction_retries)
 {
 	int max_retries = MAX_COMPACT_RETRIES;
 	int min_priority;
-- 
2.21.0


  reply	other threads:[~2019-07-25 18:43 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 ` Pengfei Li [this message]
2019-07-25 18:58   ` [PATCH 01/10] mm/page_alloc: use unsigned int for "order" in should_compact_retry() 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 ` [PATCH 09/10] mm/compaction: use unsigned int for "kcompactd_max_order" in struct pglist_data Pengfei Li
2019-07-25 18:42 ` [PATCH 10/10] mm/vmscan: use unsigned int for "kswapd_order" " 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-2-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.