From: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
To: penberg@cs.helsinki.fi
Cc: konishi.ryusuke@lab.ntt.co.jp, albertito@blitiri.com.ar,
llucax@gmail.com, linux-kernel@vger.kernel.org, users@nilfs.org
Subject: Re: NILFS2 get stuck after bio_alloc() fail
Date: Sun, 14 Jun 2009 21:34:19 +0900 (JST) [thread overview]
Message-ID: <20090614.213419.35998061.konishi.ryusuke@gmail.com> (raw)
In-Reply-To: <84144f020906140000v7b38f520rc5d9849b8ea8ad7e@mail.gmail.com>
Hi,
On Sun, 14 Jun 2009 10:00:06 +0300, Pekka Enberg <penberg@cs.helsinki.fi> wrote:
> On Sun, Jun 14, 2009 at 9:30 AM, Ryusuke
> Konishi<konishi.ryusuke@lab.ntt.co.jp> wrote:
>> The original GFP flag was GFP_NOIO, but replaced to GFP_NOWAIT at a
>> preliminary release in February 2008. It was because a user
>> experienced system memory shortage by the bio_alloc() call.
>>
>> Even though nilfs_alloc_seg_bio() repeatedly calls bio_alloc()
>> reducing the number of bio vectors in case of failure, this fallback
>> did not work well.
>>
>> I'm in two minds whether I should change it back to GFP_NOIO.
>> Or should I switch the gfp as follows?
>
> As far as I can tell, the only difference with GFP_NOIO and GFP_NOWAIT
> here is that the former will trigger the mempool_alloc() page reclaim
> path. But I am not sure I understand why switching to GFP_NOWAIT
> helped with memory shortage. What exactly was the problem there?
>
> Pekka
I will confirm the details later. I cannot dig into the record due to
planned outage at office now. The version I replaced GFP_NOIO with
GFP_NOWAIT is considerably old. A true problem might have been in
other places somewhere.
For reference, the retry loop in question is as follows. It is to
allocate bio for log writing.
bio = bio_alloc(GFP_NOWAIT, nr_vecs);
if (bio == NULL) {
while (!bio && (nr_vecs >>= 1))
bio = bio_alloc(GFP_NOWAIT, nr_vecs);
}
where nr_vecs is less than or equal to bio_get_nr_vecs(bdev).
Thanks,
Ryusuke Konishi
next prev parent reply other threads:[~2009-06-14 12:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-14 1:32 Leandro Lucarella
2009-06-14 1:52 ` Alberto Bertogli
2009-06-14 6:30 ` Ryusuke Konishi
2009-06-14 7:00 ` Pekka Enberg
2009-06-14 12:34 ` Ryusuke Konishi [this message]
2009-06-14 3:45 ` Ryusuke Konishi
2009-06-14 15:32 ` Leandro Lucarella
2009-06-14 18:02 ` Ryusuke Konishi
2009-06-14 18:13 ` Leandro Lucarella
2009-06-18 17:34 ` [PATCH] nilfs2: fix hang problem after bio_alloc() failed Ryusuke Konishi
2009-06-21 11:08 ` Andi Kleen
2009-06-21 12:34 ` [NILFS users] " Ryusuke Konishi
2009-06-23 4:40 ` NILFS2 get stuck after bio_alloc() fail Ryusuke Konishi
2009-06-23 12:55 ` Leandro Lucarella
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=20090614.213419.35998061.konishi.ryusuke@gmail.com \
--to=konishi.ryusuke@lab.ntt.co.jp \
--cc=albertito@blitiri.com.ar \
--cc=linux-kernel@vger.kernel.org \
--cc=llucax@gmail.com \
--cc=penberg@cs.helsinki.fi \
--cc=users@nilfs.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
all inboxes | Powered by JetHome®