linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [patch] mm: compaction: make compact_control order signed
@ 2012-02-01 14:41 Dan Carpenter
  2012-02-01 14:59 ` Rik van Riel
  2012-02-01 20:46 ` Andrew Morton
  0 siblings, 2 replies; 6+ messages in thread
From: Dan Carpenter @ 2012-02-01 14:41 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Mel Gorman, Minchan Kim, Rik van Riel, Andrea Arcangeli, linux-mm,
	kernel-janitors

"order" is -1 when compacting via /proc/sys/vm/compact_memory.  Making
it unsigned causes a bug in __compact_pgdat() when we test:

	if (cc->order < 0 || !compaction_deferred(zone, cc->order))
		compact_zone(zone, cc);

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/mm/compaction.c b/mm/compaction.c
index 382831e..5f80a11 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -35,7 +35,7 @@ struct compact_control {
 	unsigned long migrate_pfn;	/* isolate_migratepages search base */
 	bool sync;			/* Synchronous migration */
 
-	unsigned int order;		/* order a direct compactor needs */
+	int order;			/* order a direct compactor needs */
 	int migratetype;		/* MOVABLE, RECLAIMABLE etc */
 	struct zone *zone;
 };

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-02-01 21:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-01 14:41 [patch] mm: compaction: make compact_control order signed Dan Carpenter
2012-02-01 14:59 ` Rik van Riel
2012-02-01 20:46 ` Andrew Morton
2012-02-01 21:17   ` Rik van Riel
2012-02-01 21:24     ` Andrew Morton
2012-02-01 21:28       ` Rik van Riel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).