From: Nishanth Aravamudan <nacc@us.ibm.com>
To: William Lee Irwin III <wli@holomorphy.com>
Cc: haveblue@us.ibm.com, akpm@linux-foundation.org, mel@skynet.ie,
apw@shadowen.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm: fix confusing __GFP_REPEAT related comments
Date: Mon, 3 Dec 2007 10:06:38 -0800 [thread overview]
Message-ID: <20071203180638.GB28850@us.ibm.com> (raw)
In-Reply-To: <20071202115857.GB31637@holomorphy.com>
On 02.12.2007 [03:58:57 -0800], William Lee Irwin III wrote:
> On Thu, Nov 29, 2007 at 01:48:28PM -0800, Nishanth Aravamudan wrote:
> > The definition and use of __GFP_REPEAT, __GFP_NOFAIL and __GFP_NORETRY
> > in the core VM have somewhat differing comments as to their actual
> > semantics. Annoyingly, the flags definition has inline and header
> > comments, which might be interpreted as not being equivalent. Just add
> > references to the header comments in the inline ones so they don't go
> > out of sync in the future. In their use in __alloc_pages() clarify that
> > the current implementation treats low-order allocations and __GFP_REPEAT
> > allocations as distinct cases, albeit currently with the same result.
>
> This is a bit beyond the scope of the patch, but doesn't the obvious
> livelock behavior here disturb anyone else?
This was a concer to me as well, certainly. And perhaps an argument to
divorce low-order allocations from __GFP_REPEAT. I guess we hope reclaim
is good enough to eventually make enough progress ... however, if it
doesn't, I think we'll trigger this condition:
if (likely(did_some_progress)) {
...
} else if ((gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY)) {
try with high watermarks
if still failing the alloc
if PAGE_ALLOC_COSTLY_ORDER
fail
else
OOM
}
So, I think, the livelock condition is avoided in general as (for
low-order allocations), we can OOM to free memory, so the potentially
infinite loop should eventually finish?
Thanks,
Nish
--
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center
--
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>
next prev parent reply other threads:[~2007-12-03 18:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-29 21:48 [PATCH] mm: fix confusing __GFP_REPEAT related comments Nishanth Aravamudan
2007-11-29 23:14 ` Dave Hansen
2007-11-30 4:19 ` Nishanth Aravamudan
2007-11-30 18:27 ` Dave Hansen
2007-11-30 17:43 ` Nishanth Aravamudan
2007-11-30 18:31 ` Dave Hansen
2007-12-02 11:58 ` William Lee Irwin III
2007-12-03 18:06 ` Nishanth Aravamudan [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-11-20 1:10 Nishanth Aravamudan
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=20071203180638.GB28850@us.ibm.com \
--to=nacc@us.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=apw@shadowen.org \
--cc=haveblue@us.ibm.com \
--cc=linux-mm@kvack.org \
--cc=mel@skynet.ie \
--cc=wli@holomorphy.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).