linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, bugzilla-daemon@bugzilla.kernel.org,
	john@calva.com, Mel Gorman <mgorman@techsingularity.net>
Subject: Re: [Bug 107111] New: page allocation failure but there seem to be free pages
Date: Wed, 4 Nov 2015 11:20:23 +0100	[thread overview]
Message-ID: <20151104102023.GF29607@dhcp22.suse.cz> (raw)
In-Reply-To: <20151103141603.261893b44e0cd6e704921fb6@linux-foundation.org>

On Tue 03-11-15 14:16:03, Andrew Morton wrote:
[...]
> > [1188431.177410] apache2: page allocation failure: order:1, mode:0x204020
> 
> An order-1 page, __GFP_COMP|__GFP_HIGH.  ie: GFP_ATOMIC.

__GFP_HIGH doesn't really work well on a small zone like DMA I am
afraid.

[...]
> > [1188431.177521] Node 0 DMA free:7968kB min:40kB low:48kB high:60kB
[...]
> > [1188431.177527] lowmem_reserve[]: 0 1988 1988 1988
[...]
> > [1188431.177555] Node 0 DMA: 44*4kB (UE) 94*8kB (UEM) 76*16kB (UE) 42*32kB
> > (UEM) 22*64kB (UEM) 6*128kB (UE) 3*256kB (UE) 1*512kB (E) 1*1024kB (U) 0*2048kB
> > 0*4096kB = 7968kB
> 
> The DMA zone has lots and lots of higher-order pages available which
> could satisfy this allocation.

min = 10 - 10/2 = 5 # __GFP_HIGH
min = 5 - 5/4 = 4  # ALLOC_HARDER
free_pages = 1992 - ((1<<1) - 1) = 1991
free_cma = 0

1991 <= 4 + 1988

So we do not pass lowmem reserves check here...

[...]
> The kernel could and should have satisfied this order-1 GFP_ATOMIC
> IRQ-context allocation from the DMA zone.  But it did not do so.  Bug.

I am not really sure this is a bug to be honest. It seems that we are
not coping with the non sleeping allocation pressure. I would suggest
increasing min_free_kbytes.
-- 
Michal Hocko
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      parent reply	other threads:[~2015-11-04 10:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-107111-27@https.bugzilla.kernel.org/>
2015-11-03 22:16 ` Andrew Morton
2015-11-04 10:10   ` John Hughes
2015-11-04 10:20   ` Michal Hocko [this message]

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=20151104102023.GF29607@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bugzilla-daemon@bugzilla.kernel.org \
    --cc=john@calva.com \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    /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