summaryrefslogtreecommitdiffstats
path: root/mm/compaction.c
diff options
context:
space:
mode:
authorMel Gorman <mgorman@techsingularity.net>2016-05-19 20:13:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-19 22:12:14 -0400
commitc603844bdcb5238980de8d58b393f52d7729d651 (patch)
treec6aefae3a21374dc65f21b89d47965c65fba9f4a /mm/compaction.c
parentf75fb889d18d362e336f8d3fba158a8636d0a063 (diff)
mm, page_alloc: convert alloc_flags to unsigned
alloc_flags is a bitmask of flags but it is signed which does not necessarily generate the best code depending on the compiler. Even without an impact, it makes more sense that this be unsigned. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/compaction.c')
-rw-r--r--mm/compaction.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/mm/compaction.c b/mm/compaction.c
index 7487067b4613..8f339ca25621 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1313,7 +1313,8 @@ static int compact_finished(struct zone *zone, struct compact_control *cc,
1313 * COMPACT_CONTINUE - If compaction should run now 1313 * COMPACT_CONTINUE - If compaction should run now
1314 */ 1314 */
1315static unsigned long __compaction_suitable(struct zone *zone, int order, 1315static unsigned long __compaction_suitable(struct zone *zone, int order,
1316 int alloc_flags, int classzone_idx) 1316 unsigned int alloc_flags,
1317 int classzone_idx)
1317{ 1318{
1318 int fragindex; 1319 int fragindex;
1319 unsigned long watermark; 1320 unsigned long watermark;
@@ -1358,7 +1359,8 @@ static unsigned long __compaction_suitable(struct zone *zone, int order,
1358} 1359}
1359 1360
1360unsigned long compaction_suitable(struct zone *zone, int order, 1361unsigned long compaction_suitable(struct zone *zone, int order,
1361 int alloc_flags, int classzone_idx) 1362 unsigned int alloc_flags,
1363 int classzone_idx)
1362{ 1364{
1363 unsigned long ret; 1365 unsigned long ret;
1364 1366
@@ -1530,7 +1532,7 @@ out:
1530 1532
1531static unsigned long compact_zone_order(struct zone *zone, int order, 1533static unsigned long compact_zone_order(struct zone *zone, int order,
1532 gfp_t gfp_mask, enum migrate_mode mode, int *contended, 1534 gfp_t gfp_mask, enum migrate_mode mode, int *contended,
1533 int alloc_flags, int classzone_idx) 1535 unsigned int alloc_flags, int classzone_idx)
1534{ 1536{
1535 unsigned long ret; 1537 unsigned long ret;
1536 struct compact_control cc = { 1538 struct compact_control cc = {
@@ -1571,8 +1573,8 @@ int sysctl_extfrag_threshold = 500;
1571 * This is the main entry point for direct page compaction. 1573 * This is the main entry point for direct page compaction.
1572 */ 1574 */
1573unsigned long try_to_compact_pages(gfp_t gfp_mask, unsigned int order, 1575unsigned long try_to_compact_pages(gfp_t gfp_mask, unsigned int order,
1574 int alloc_flags, const struct alloc_context *ac, 1576 unsigned int alloc_flags, const struct alloc_context *ac,
1575 enum migrate_mode mode, int *contended) 1577 enum migrate_mode mode, int *contended)
1576{ 1578{
1577 int may_enter_fs = gfp_mask & __GFP_FS; 1579 int may_enter_fs = gfp_mask & __GFP_FS;
1578 int may_perform_io = gfp_mask & __GFP_IO; 1580 int may_perform_io = gfp_mask & __GFP_IO;