public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Sage Weil <sage@newdream.net>
Cc: xfs@oss.sgi.com
Subject: Re: inconsistent lock state on 2.6.30?
Date: Tue, 23 Jun 2009 13:08:44 -0400	[thread overview]
Message-ID: <20090623170844.GA23971@infradead.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0906230925420.20462@cobra.newdream.net>

On Tue, Jun 23, 2009 at 09:26:04AM -0700, Sage Weil wrote:
> Hi,
> 
> I have 6 machines using an XFS volume for logs, and strangely all 6 of 
> them spit out the following at roughly the same time last night.  Most are 
> around 50% full, all with a single directory full of large append-only 
> files.  They're all running similar workloads, and are all nfs exported.
> 
> Is this a known issue?  If there's any other info that'd be helpful, let 
> me know.

> [15995.063830] inconsistent {RECLAIM_FS-ON-R} -> {IN-RECLAIM_FS-W} usage.
> [15995.063830] kswapd0/290 [HC0[0]:SC0[0]:HE1:SE1] takes:
> [15995.063830]  (&(&ip->i_lock)->mr_lock){++++-?}, at: 
> [<ffffffff803af57a>] xfs_ilock+0x5b/0x79
> [15995.063830] {RECLAIM_FS-ON-R} state was registered at:

If I understand this correctly we take a rw/semaphore in the reclaim
path, and also in a memory allocation that may call back into the fs.

I don't think the actual condition is new, but I've never seen the
warning before.  The patch below should take care of it, can you give it
a try?

Index: linux-2.6/fs/xfs/xfs_da_btree.c
===================================================================
--- linux-2.6.orig/fs/xfs/xfs_da_btree.c	2009-06-23 19:04:54.640929986 +0200
+++ linux-2.6/fs/xfs/xfs_da_btree.c	2009-06-23 19:05:20.615966923 +0200
@@ -2261,9 +2261,9 @@ xfs_da_buf_make(int nbuf, xfs_buf_t **bp
 	int		off;
 
 	if (nbuf == 1)
-		dabuf = kmem_zone_alloc(xfs_dabuf_zone, KM_SLEEP);
+		dabuf = kmem_zone_alloc(xfs_dabuf_zone, KM_NOFS);
 	else
-		dabuf = kmem_alloc(XFS_DA_BUF_SIZE(nbuf), KM_SLEEP);
+		dabuf = kmem_alloc(XFS_DA_BUF_SIZE(nbuf), KM_NOFS);
 	dabuf->dirty = 0;
 #ifdef XFS_DABUF_DEBUG
 	dabuf->ra = ra;

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

  reply	other threads:[~2009-06-23 17:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-23 16:26 inconsistent lock state on 2.6.30? Sage Weil
2009-06-23 17:08 ` Christoph Hellwig [this message]
2009-06-24  5:52   ` Sage Weil
2009-06-24 21:40   ` Sage Weil
2009-06-26 17:35     ` Christoph Hellwig
2009-07-10 16:02       ` Christoph Hellwig

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=20090623170844.GA23971@infradead.org \
    --to=hch@infradead.org \
    --cc=sage@newdream.net \
    --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