From: Enrik Berkhan <Enrik.Berkhan@ge.com>
To: tytso@mit.edu
Cc: linux-ext4@vger.kernel.org
Subject: Re: possible ext4 related deadlock
Date: Wed, 10 Mar 2010 17:23:38 +0100 [thread overview]
Message-ID: <4B97C78A.10301@ge.com> (raw)
In-Reply-To: <20100305154552.GA6000@thunk.org>
tytso@mit.edu wrote:
> On Fri, Mar 05, 2010 at 02:56:28PM +0100, Enrik Berkhan wrote:
>> Meanwhile, I have found out that thread 2 actually isn't completely
>> blocked but loops in __alloc_pages_internal:
>>
>> get_page_from_freelist() doesn't return a page;
>> try_to_free_pages() returns did_some_progress == 0;
>> later, do_retry == 1 and the loop restarts with goto rebalance;
>>
>>
>> Can anybody explain this behaviour and maybe direct me to the root cause?
I think, I have isolated it further: the Blackfin/NOMMU changes are
simply to call drop_pagecache() in __alloc_pages_internal() before
trying harder to get pages, which generally is a good thing on NOMMU. We
have far less OOMs since that has been introduced into the Blackfin patches.
So, the call sequence may reduce to
...
/* got no free page on first try */
drop_pagecache();
rebalance:
did_some_progress = try_to_free_pages();
/* returns 0, most probably because drop_pagecache() has already cleaned
up everything possible, thus no call to get_page_from_freelist() */
drop_pagecache();
goto rebalance;
...
>> Of course, this now looks more like a page allocation problem than
>> an ext4 one.
>
> Yep, I'd have to agree with you. We're only trying to allocate a
> single page here, and you have plenty of pages available. Just
> checking.... you don't have CONFIG_NUMA enabled and doing something
> crazy with NUMA nodes, are you?
no NUMA, of course :)
The ext4 contribution to the problem is setting AOP_FLAG_NOFS, which is
correct, of course. And because most probably no one else in the world
uses ext4 on Blackfin/NOMMU, the endless loop only triggers here.
So it's definitely a page allocation problem and a better workaround is
to call get_page_from_freelist() after each call to drop_pagecache().
I will continue this discussion on the Blackfin list.
Thanks for your patience.
Enrik
prev parent reply other threads:[~2010-03-10 16:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-12 12:49 possible ext4 related deadlock Enrik Berkhan
2010-02-18 1:55 ` Jan Kara
2010-03-05 13:56 ` Enrik Berkhan
2010-03-05 15:45 ` tytso
2010-03-10 16:23 ` Enrik Berkhan [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=4B97C78A.10301@ge.com \
--to=enrik.berkhan@ge.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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).