public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Linda A. Walsh" <xfs@tlinx.org>
Cc: xfs-oss <xfs@oss.sgi.com>, LKML <linux-kernel@vger.kernel.org>,
	Eric Sandeen <sandeen@sandeen.net>
Subject: Re: XFS Lock debugging noise or real problem?
Date: Wed, 13 Aug 2008 10:58:52 +1000	[thread overview]
Message-ID: <20080813005852.GW6119@disturbed> (raw)
In-Reply-To: <48A20E9E.9090100@tlinx.org>

On Tue, Aug 12, 2008 at 03:28:46PM -0700, Linda A. Walsh wrote:
> Eric Sandeen wrote:
>>   ...
> Is it also known, (and the same bug) when you get the lock warnings when  
> doing
> "xfs_restore", as well (dio_get_page and xfs_ilock)...

That's the mm code calling fput() with the mmap_sem held. That's a
problem in the VM code, which XFS can do nothing about. The normal
I/O paths always lock the inode first, then (if a page fault occurs
during copyin/out or we need to lock down pages for direct I/O) grab
the mmap_sem at that point. This one could deadlock if you are mixing
read/write with mmap on the same file in different threads of a
multithreaded app. Unlikely, but possible, though it would
only hang that app (not the rest of the machine).

> The bugs with 'sort', & imap were both with xfs_ilock and  
> shrink_icache_memory.

Once again, a problem with the generic code inverting the normal
lock order. This one cannot deadlock, though, because by definition
any inode on the unused list is, well, unused and hence we can't be
holding a reference to it...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2008-08-13  0:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-11 19:31 Lock debugging noise or real problem? Linda Walsh
2008-08-11 20:10 ` Eric Sandeen
2008-08-12  2:33   ` Linda Walsh
2008-08-12  2:48     ` Eric Sandeen
2008-08-12  3:35       ` Linda Walsh
2008-08-12 22:28       ` XFS " Linda A. Walsh
2008-08-13  0:58         ` Dave Chinner [this message]
2008-08-13 22:05           ` Linda Walsh
2008-08-14  0:41             ` Dave Chinner
2008-08-14  1:04               ` Linda Walsh

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=20080813005852.GW6119@disturbed \
    --to=david@fromorbit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    --cc=xfs@oss.sgi.com \
    --cc=xfs@tlinx.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