[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190109111609.GW31517@techsingularity.net>
Date: Wed, 9 Jan 2019 11:16:09 +0000
From: Mel Gorman <mgorman@...hsingularity.net>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: David Rientjes <rientjes@...gle.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Vlastimil Babka <vbabka@...e.cz>, ying.huang@...el.com,
Dan Carpenter <dan.carpenter@...cle.com>, kirill@...temov.name,
Linux-MM <linux-mm@...ck.org>,
Linux List Kernel Mailing <linux-kernel@...r.kernel.org>
Subject: [PATCH] mm, compaction: Round-robin the order while searching the
free lists for a target -fix
Dan Carpenter reported the following static checker warning:
mm/compaction.c:1252 next_search_order()
warn: impossible condition '(cc->search_order < 0) => (0-u16max < 0)'
While a negative order never makes sense, the control flow is
easier if search_order is signed. This is a fix to the mmotm patch
broken-out/mm-compaction-round-robin-the-order-while-searching-the-free-lists-for-a-target.patch
Signed-off-by: Mel Gorman <mgorman@...hsingularity.net>
---
mm/internal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/internal.h b/mm/internal.h
index d028abd8a8f3..e74dbc257550 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -192,7 +192,7 @@ struct compact_control {
unsigned long total_migrate_scanned;
unsigned long total_free_scanned;
unsigned short fast_search_fail;/* failures to use free list searches */
- unsigned short search_order; /* order to start a fast search at */
+ short search_order; /* order to start a fast search at */
const gfp_t gfp_mask; /* gfp mask of a direct compactor */
int order; /* order a direct compactor needs */
int migratetype; /* migratetype of direct compactor */
Powered by blists - more mailing lists