From: Ingo Molnar <mingo@elte.hu>
To: Christoph Hellwig <hch@infradead.org>,
Steven Whitehouse <swhiteho@redhat.com>,
Linus Torvalds <torvalds@osdl.org>,
David Teigland <teigland@redhat.com>,
Patrick Caulfield <pcaulfie@redhat.com>,
Kevin Anderson <kanderso@redhat.com>,
Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: GFS2 and DLM
Date: Tue, 27 Jun 2006 08:33:39 +0200 [thread overview]
Message-ID: <20060627063339.GA27938@elte.hu> (raw)
In-Reply-To: <20060626200300.GA15424@elte.hu>
* Ingo Molnar <mingo@elte.hu> wrote:
> * Christoph Hellwig <hch@infradead.org> wrote:
>
> > The code uses GFP_NOFAIL for slab allocator calls. It's been
> > pointed out here numerous times that this can't work. Andrew, what
> > about adding a check to slab.c to bail out if someone passes it?
>
> reiserfs, jbd and NTFS are all using GFP_NOFAIL ...
>
> i dont think this is a huge issue that should block merging.
oh, and XFS has this little gem in its journalling code:
fs/xfs/xfs_log.c:
STATIC void
xlog_state_ticket_alloc(xlog_t *log)
{
[...]
/*
* The kmem_zalloc may sleep, so we shouldn't be holding the
* global lock. XXXmiken: may want to use zone allocator.
*/
buf = (xfs_caddr_t) kmem_zalloc(NBPP, KM_SLEEP);
s = LOG_LOCK(log);
/* Attach 1st ticket to Q, so we can keep track of allocated memory */
t_list = (xlog_ticket_t *)buf;
t_list->t_next = log->l_unmount_free;
[...]
where kmem_zalloc() may fail!!!
So XFS is apprarently hiding the "journalling allocations must not fail"
problem by ... crashing? Wow! Most of the other journalling filesystems
loop on the allocator: the honest ones do it via GFP_NOFAIL, others via
open-coded infinite retry loops.
Just in case anyone says 'preallocate': that's _hard_ to do in a
sophisticated filesystem, which has many dynamic (and delayed) decisions
that make the prediction of resource overhead difficult. That's the
fundamental reason why basically all journalling filesystems either loop
(or the really enterprise quality ones: crash ;) on allocation failure.
Btw., i have just taken a 5 minute tour into XFS, and i found at least 5
other problems with the XFS code that are similar in nature to the ones
you pointed out. (mostly useless wrappers around Linux functionality)
Isnt this whole episode highly hypocritic to begin with?
Ingo
next prev parent reply other threads:[~2006-06-27 6:38 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-20 12:17 GFS2 and DLM Steven Whitehouse
2006-06-20 12:32 ` Nick Piggin
2006-06-20 12:47 ` Steven Whitehouse
2006-06-20 14:04 ` Nick Piggin
2006-06-20 15:40 ` Steven Whitehouse
2006-06-20 19:55 ` Andrew Morton
2006-06-21 11:20 ` Steven Whitehouse
2006-06-23 14:45 ` Christoph Hellwig
2006-06-26 21:03 ` Ingo Molnar
2006-06-27 7:52 ` Christoph Hellwig
2006-06-20 12:33 ` Christoph Hellwig
2006-06-20 12:55 ` Steven Whitehouse
2006-06-20 15:55 ` Ingo Molnar
2006-06-23 14:49 ` Christoph Hellwig
2006-06-23 20:46 ` Andrew Morton
2006-06-26 20:03 ` Ingo Molnar
2006-06-26 20:12 ` Arjan van de Ven
2006-06-27 7:08 ` Ingo Molnar
2006-06-27 6:33 ` Ingo Molnar [this message]
2006-06-27 6:43 ` Arjan van de Ven
2006-06-27 7:07 ` Ingo Molnar
2006-06-27 7:06 ` Andrew Morton
2006-06-27 8:35 ` Ingo Molnar
2006-06-27 8:50 ` Andrew Morton
2006-06-27 9:04 ` Ingo Molnar
2006-06-27 9:23 ` Andrew Morton
2006-07-03 13:40 ` Steven Whitehouse
2006-06-27 8:16 ` Nathan Scott
2006-06-27 8:22 ` Ingo Molnar
2006-06-27 8:41 ` Pekka Enberg
2006-06-27 10:33 ` Ingo Molnar
2006-06-27 8:42 ` Nathan Scott
2006-06-27 8:51 ` Ingo Molnar
2006-06-23 14:54 ` Christoph Hellwig
2006-06-23 15:54 ` Steven Whitehouse
2006-06-23 15:54 ` Christoph Hellwig
2006-06-23 16:09 ` Steven Whitehouse
2006-06-23 14:55 ` Christoph Hellwig
2006-06-23 14:57 ` Christoph Hellwig
2006-06-23 15:26 ` Steven Whitehouse
2006-06-23 15:00 ` Christoph Hellwig
2006-06-23 16:29 ` Steven Whitehouse
2006-06-23 16:48 ` Christoph Hellwig
2006-06-26 20:58 ` Ingo Molnar
2006-06-27 7:50 ` Christoph Hellwig
2006-06-27 8:31 ` Ingo Molnar
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=20060627063339.GA27938@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@osdl.org \
--cc=hch@infradead.org \
--cc=kanderso@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pcaulfie@redhat.com \
--cc=swhiteho@redhat.com \
--cc=teigland@redhat.com \
--cc=torvalds@osdl.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