public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: next-20090220: XFS, IMA: BUG: sleeping function called from invalid  context at mm/slub.c:1613
Date: Wed, 25 Feb 2009 09:34:51 +1100	[thread overview]
Message-ID: <20090224223451.GE26138@disturbed> (raw)
In-Reply-To: <20090224191429.GA10627@infradead.org>

On Tue, Feb 24, 2009 at 02:14:29PM -0500, Christoph Hellwig wrote:
> On Fri, Feb 20, 2009 at 12:22:42PM -0800, Andrew Morton wrote:
> > But to fix this bug, xfs needs to stop calling inode_init_always()
> > under read_lock().  Because inode_alloc_security() also can sleep (see
> > new_inode_smack()).
> 
> The normal inode initialization path is fine as it's not in atomic
> context, but if we relcaim a partially torn down inode in
> xfs_iget_cache_hit we call inode_init_always under pag_ici_lock.
> 
> I wonder if we should just give up on trying to "recover" such
> inodes.  Instead call finish_reclaim on them and restart the inode
> cache lookup.

The reason for this code is that journalling allows us to reuse the
inode without flushing it to disk. If we reclaim it, then we force
it to be flushed to disk before it can be reused. That will greatly
slow down workloads that create and delete temporary files
repeatedly.

I had a brief look at the code, and I think it can be reworked to
avoid re-initialisation under the pag_ici_lock. I should have some
time this weekend to test a fix....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2009-02-24 22:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-20 11:00 next-20090220: XFS, IMA: BUG: sleeping function called from invalid context at mm/slub.c:1613 Alexander Beregalov
2009-02-20 20:22 ` Andrew Morton
2009-02-20 22:16   ` Mimi Zohar
2009-02-20 22:28     ` Andrew Morton
2009-02-22  1:49       ` Mimi Zohar
2009-02-24 19:14   ` Christoph Hellwig
2009-02-24 22:34     ` Dave Chinner [this message]
2009-02-24 22:39   ` Mimi Zohar

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=20090224223451.GE26138@disturbed \
    --to=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=xfs@oss.sgi.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