linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Mel Gorman <mel@csn.ul.ie>, Minchan Kim <minchan@kernel.org>,
	Rik van Riel <riel@redhat.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	linux-mm@kvack.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] mm: compaction: make compact_control order signed
Date: Wed, 1 Feb 2012 12:46:51 -0800	[thread overview]
Message-ID: <20120201124651.9203acde.akpm@linux-foundation.org> (raw)
In-Reply-To: <20120201144101.GA5397@elgon.mountain>

On Wed, 1 Feb 2012 17:41:01 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:

> "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;
>  };

One would expect this to significantly change the behaviour of
/proc/sys/vm/compact_memory.  Enfeebled minds want to know: is
the new behaviour better or worse than the old behaviour?

--
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>

  parent reply	other threads:[~2012-02-01 20:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2012-02-01 21:17   ` Rik van Riel
2012-02-01 21:24     ` Andrew Morton
2012-02-01 21:28       ` Rik van Riel

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=20120201124651.9203acde.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=aarcange@redhat.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=minchan@kernel.org \
    --cc=riel@redhat.com \
    /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 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).