From: Mel Gorman <mgorman@suse.de>
To: Michal Hocko <mhocko@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: fix special case -1 order check in compact_finished
Date: Mon, 30 May 2011 13:53:45 +0100 [thread overview]
Message-ID: <20110530125345.GB5118@suse.de> (raw)
In-Reply-To: <20110530123831.GG20166@tiehlicka.suse.cz>
On Mon, May 30, 2011 at 02:38:31PM +0200, Michal Hocko wrote:
> 56de7263 (mm: compaction: direct compact when a high-order allocation
> fails) introduced a check for cc->order == -1 in compact_finished. We
> should continue compacting in that case because the request came from
> userspace and there is no particular order to compact for.
>
> The check is, however, done after zone_watermark_ok which uses order as
> a right hand argument for shifts. Not only watermark check is pointless
> if we can break out without it but it also uses 1 << -1 which is not
> well defined (at least from C standard). Let's move the -1 check above
> zone_watermark_ok.
>
> Signed-off-by: Michal Hocko <mhocko@suse.cz>
> Cc: Mel Gorman <mgorman@suse.de>
Acked-by: Mel Gorman <mgorman@suse.de>
--
Mel Gorman
SUSE Labs
WARNING: multiple messages have this Message-ID (diff)
From: Mel Gorman <mgorman@suse.de>
To: Michal Hocko <mhocko@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: fix special case -1 order check in compact_finished
Date: Mon, 30 May 2011 13:53:45 +0100 [thread overview]
Message-ID: <20110530125345.GB5118@suse.de> (raw)
In-Reply-To: <20110530123831.GG20166@tiehlicka.suse.cz>
On Mon, May 30, 2011 at 02:38:31PM +0200, Michal Hocko wrote:
> 56de7263 (mm: compaction: direct compact when a high-order allocation
> fails) introduced a check for cc->order == -1 in compact_finished. We
> should continue compacting in that case because the request came from
> userspace and there is no particular order to compact for.
>
> The check is, however, done after zone_watermark_ok which uses order as
> a right hand argument for shifts. Not only watermark check is pointless
> if we can break out without it but it also uses 1 << -1 which is not
> well defined (at least from C standard). Let's move the -1 check above
> zone_watermark_ok.
>
> Signed-off-by: Michal Hocko <mhocko@suse.cz>
> Cc: Mel Gorman <mgorman@suse.de>
Acked-by: Mel Gorman <mgorman@suse.de>
--
Mel Gorman
SUSE Labs
--
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>
next prev parent reply other threads:[~2011-05-30 12:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-30 12:38 [PATCH] mm: fix special case -1 order check in compact_finished Michal Hocko
2011-05-30 12:38 ` Michal Hocko
2011-05-30 12:53 ` Mel Gorman [this message]
2011-05-30 12:53 ` Mel Gorman
2011-05-30 15:16 ` Minchan Kim
2011-05-30 15:16 ` Minchan Kim
2011-05-30 15:24 ` [PATCH v2] mm: compaction: fix special case -1 order checks Michal Hocko
2011-05-30 15:24 ` Michal Hocko
2011-05-30 15:37 ` Minchan Kim
2011-05-30 15:37 ` Minchan Kim
2011-06-02 10:38 ` Mel Gorman
2011-06-02 10:38 ` Mel Gorman
2011-05-31 4:34 ` [PATCH] mm: fix special case -1 order check in compact_finished KAMEZAWA Hiroyuki
2011-05-31 4:34 ` KAMEZAWA Hiroyuki
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=20110530125345.GB5118@suse.de \
--to=mgorman@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@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.