xfs
[Top] [All Lists]

Re: TAKE 981498 - Use KM_NOFS for debug trace buffers

To: "Lachlan McIlroy" <lachlan@xxxxxxx>
Subject: Re: TAKE 981498 - Use KM_NOFS for debug trace buffers
From: "Bhagi rathi" <jahnu77@xxxxxxxxx>
Date: Wed, 6 Aug 2008 22:42:15 +0530
Cc: sgi.bugs.xfs@xxxxxxxxxxxx, xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=oXhd3wRalpHIU3gV2lrKE0VOtPMq08+mQxNUn5iKik0=; b=RPW1zgLmp7rJ9bdM6FdaqKkAeeIhY0kyNrSTimBBXHDy07Y2GN15tuUD2hgNM4x3ts H6fQt0jY34nryo9k0fq6fS7WKJr+/bCLKvgjYVRmoU9vjRnHxZqjXYEFGmfR3L2ekhWD jbn0kxphNT4uAKyAZP5zLSaM0CDwCeB7lm7vg=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=Hi1mCCslWXTj4ru5c/2IUeQcUsE3HOHJkVWzFm+U+Av1oLhinhV8FGMZo4dUEifahO ge6vRBWN/XRiGjo5MXNz+uiRKuUbdDvjk9lm/vJofhh3TrmVtBTVLOcM7vuMQ6e9IGGA 8DgQdVtHsiskisYBQke2SCyBAaafJ8mhxZ8E4=
In-reply-to: <20080806061553.A8D8958C52A4@xxxxxxxxxxxxxxxxxxxxxxx>
References: <20080806061553.A8D8958C52A4@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
I couldn't get a chance to read the diff's completely. If I click on
Lachlan's url for diff's, I couldn't access them. It looks to me that
the issue is not just with trace buffers. It can extend to xfs_iformat
as well. The same dead-lock can spring via

xfs_iread -> xfs_iformat -> xfs_iformat_extents -> xfs_iext_add ->
xfs_iext_inline_to_direct -> which can do kmem_alloc with
KM_SLEEP flag.


The source of the problem is that holding a lock and entering into
file-system once again. This can lead to dead-lock on the same
clustered buffer during cleaning of log space.

Cheers,
Bhagi.


On Wed, Aug 6, 2008 at 11:45 AM, Lachlan McIlroy <lachlan@xxxxxxx> wrote:

> Use KM_NOFS for debug trace buffers
>
> Use KM_NOFS to prevent recursion back into the filesystem which can
> cause deadlocks.
>
> In the case of xfs_iread() we hold the lock on the inode cluster buffer
> while allocating memory for the trace buffers.  If we recurse back into
> XFS to flush data that may require a transaction to allocate extents
> which needs log space.  This can deadlock with the xfsaild thread which
> can't push the tail of the log because it is trying to get the inode
> cluster buffer lock.
>
> Date:  Wed Aug  6 16:15:14 AEST 2008
> Workarea:  redback.melbourne.sgi.com:/home/lachlan/isms/2.6.x-mm
> Inspected by:  david@xxxxxxxxxxxxx
> Author:  lachlan
>
> The following file(s) were checked into:
>  longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb
>
>
> Modid:  xfs-linux-melb:xfs-kern:31838a
> fs/xfs/xfs_log.c - 1.362 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/> 
xfs_log.c.diff?r1=text&tr1=1.362&r2=text&tr2=1.361&f=h
>
> http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_log.c.diff?r1=text&tr1=1.362&r2=text&tr2=1.361&f=h
> fs/xfs/xfs_buf_item.c<http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_log.c.diff?r1=text&tr1=1.362&r2=text&tr2=1.361&f=hfs/xfs/xfs_buf_item.c>-
>  1.168 - changed
>
> http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_buf_item.c.diff?r1=text&tr1=1.168&r2=text&tr2=1.167&f=h
> fs/xfs/xfs_inode.c<http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_buf_item.c.diff?r1=text&tr1=1.168&r2=text&tr2=1.167&f=hfs/xfs/xfs_inode.c>-
>  1.518 - changed
>
> http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.c.diff?r1=text&tr1=1.518&r2=text&tr2=1.517&f=h
> fs/xfs/quota/xfs_dquot.c<http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.c.diff?r1=text&tr1=1.518&r2=text&tr2=1.517&f=hfs/xfs/quota/xfs_dquot.c>-
>  1.38 - changed
>
> http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/quota/xfs_dquot.c.diff?r1=text&tr1=1.38&r2=text&tr2=1.37&f=h
> fs/xfs/linux-2.6/xfs_buf.c<http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/quota/xfs_dquot.c.diff?r1=text&tr1=1.38&r2=text&tr2=1.37&f=hfs/xfs/linux-2.6/xfs_buf.c>-
>  1.262 - changed
>
> http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_buf.c.diff?r1=text&tr1=1.262&r2=text&tr2=1.261&f=h
> fs/xfs/xfs_filestream.c<http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_buf.c.diff?r1=text&tr1=1.262&r2=text&tr2=1.261&f=hfs/xfs/xfs_filestream.c>-
>  1.9 - changed
>
> http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_filestream.c.diff?r1=text&tr1=1.9&r2=text&tr2=1.8&f=h
>        - Use KM_NOFS for debug trace buffers
>
>
>
>
>


[[HTML alternate version deleted]]


<Prev in Thread] Current Thread [Next in Thread>