From: Michal Hocko <mhocko@suse.cz>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: mgorman@suse.de, linux-mm@kvack.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: mm: page_alloc: avoid marking zones full prematurely after zone_reclaim()
Date: Wed, 27 Mar 2013 17:55:56 +0100 [thread overview]
Message-ID: <20130327165556.GA22966@dhcp22.suse.cz> (raw)
In-Reply-To: <20130327060141.GA23703@longonot.mountain>
[Adding Andrew into CC]
Hi Dan,
On Wed 27-03-13 09:01:42, Dan Carpenter wrote:
> Hello Mel Gorman,
>
> The patch 290d1a3ce0ec: "mm: page_alloc: avoid marking zones full
> prematurely after zone_reclaim()" from Mar 23, 2013, leads to the
> following warning:
> "mm/page_alloc.c:1957 get_page_from_freelist()
> warn: bitwise AND condition is false here"
Dohh, I have totally missed this during review and I managed to burn
myself on the similar issue in the past (gfp & GFP_NOWAIT).
The follow up fix is bellow
> mm/page_alloc.c
> 1948 /*
> 1949 * Failed to reclaim enough to meet watermark.
> 1950 * Only mark the zone full if checking the min
> 1951 * watermark or if we failed to reclaim just
> 1952 * 1<<order pages or else the page allocator
> 1953 * fastpath will prematurely mark zones full
> 1954 * when the watermark is between the low and
> 1955 * min watermarks.
> 1956 */
> 1957 if ((alloc_flags & ALLOC_WMARK_MIN) ||
> ^^^^^^^^^^^^^^^
> This is zero.
>
> 1958 ret == ZONE_RECLAIM_SOME)
> 1959 goto this_zone_full;
>
> [snip]
>
> 2333 static inline int
> 2334 gfp_to_alloc_flags(gfp_t gfp_mask)
> 2335 {
> 2336 int alloc_flags = ALLOC_WMARK_MIN | ALLOC_CPUSET;
> ^^^^^^^^^^^^^^^
> 2337 const gfp_t wait = gfp_mask & __GFP_WAIT;
---
next prev parent reply other threads:[~2013-03-27 16:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-27 6:01 mm: page_alloc: avoid marking zones full prematurely after zone_reclaim() Dan Carpenter
2013-03-27 16:55 ` Michal Hocko [this message]
2013-03-27 17:13 ` Michal Hocko
2013-04-01 11:13 ` Dan Carpenter
2013-04-02 9:55 ` Michal Hocko
2013-04-02 10:37 ` Mel Gorman
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=20130327165556.GA22966@dhcp22.suse.cz \
--to=mhocko@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=dan.carpenter@oracle.com \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
/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).