From: "liyu@WAN" <liyu@ccoss.com.cn>
To: linux-kernel@vger.kernel.org
Subject: Re: Question about page allocation failure
Date: Thu, 15 Sep 2005 15:03:43 +0800 [thread overview]
Message-ID: <43291CCF.4010902@ccoss.com.cn> (raw)
In-Reply-To: <432914F1.4090001@rentalia.com>
the related code is here:
/* This allocation should allow future memory freeing. */
if (((p->flags & PF_MEMALLOC) ||
unlikely(test_thread_flag(TIF_MEMDIE)))
&& !in_interrupt()) {
if (!(gfp_mask & __GFP_NOMEMALLOC)) {
/* go through the zonelist yet again, ignoring
mins */
for (i = 0; (z = zones[i]) != NULL; i++) {
if (!cpuset_zone_allowed(z))
continue;
page = buffered_rmqueue(z, order, gfp_mask);
if (page)
goto got_pg;
}
}
goto nopage;
}
/* Atomic allocations - we can't balance anything */
if (!wait)
goto nopage;
nopage:
if (!(gfp_mask & __GFP_NOWARN) && printk_ratelimit()) {
printk(KERN_WARNING "%s: page allocation failure."
" order:%d, mode:0x%x\n",
p->comm, order, gfp_mask);
dump_stack();
}
return NULL;
if we are in normal case, there have two possbiles:
1. total of memory is too low.
2. /* Atomic allocations - we can't balance anything */
I think this is not too dangerous.
PS: I use 2.6.12.
Any more clear idea?
sailor
nopage:
next prev parent reply other threads:[~2005-09-15 7:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-15 6:30 Question about page allocation failure Ruben Rubio Rey
2005-09-15 7:03 ` liyu@WAN [this message]
2005-09-15 9:59 ` Nathan Scott
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=43291CCF.4010902@ccoss.com.cn \
--to=liyu@ccoss.com.cn \
--cc=linux-kernel@vger.kernel.org \
/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