From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id q3P0Pv4S128317 for ; Tue, 24 Apr 2012 19:25:58 -0500 Received: from ipmail04.adl6.internode.on.net (ipmail04.adl6.internode.on.net [150.101.137.141]) by cuda.sgi.com with ESMTP id JgQkx7FJVYJ3g5wa for ; Tue, 24 Apr 2012 17:25:56 -0700 (PDT) Date: Wed, 25 Apr 2012 10:25:52 +1000 From: Dave Chinner Subject: Re: [RFC]xfs: using GFP_NOFS for blkdev_issue_flush Message-ID: <20120425002552.GU9541@dastard> References: <4F8BC112.9090508@fusionio.com> <4F8BC30D.5040601@kernel.org> <20120418013746.GL6734@dastard> <20120424132346.GA24575@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20120424132346.GA24575@kernel.org> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: xfs-bounces@oss.sgi.com Errors-To: xfs-bounces@oss.sgi.com To: Shaohua Li Cc: hch@infradead.org, xfs@oss.sgi.com On Tue, Apr 24, 2012 at 09:23:46PM +0800, Shaohua Li wrote: > On Wed, Apr 18, 2012 at 11:37:46AM +1000, Dave Chinner wrote: > > On Mon, Apr 16, 2012 at 02:58:21PM +0800, Shaohua Li wrote: > > > On 4/16/12 2:49 PM, Shaohua Li wrote: > > > > > > > >flush request is issued in transaction commit code path usually, so > > > >looks using > > > >GFP_KERNEL to allocate memory for flush request bio falls into the classic > > > >deadlock issue (memory reclaim recursion). Use GFP_NOFS to avoid recursion > > > >from reclaim context. Per Dave Chinner, there is only blkdev_issue_flush > > > >might > > > >be buggy here. But using GFP_NOFS by default for all calls should not > > > >matter. > > > > Can you update the commit message like I suggested previously? > Copied exactly. > > > Issuing a block device flush request in transaction context using GFP_KERNEL > directly can cause deadlocks due to memory reclaim recursion. Use GFP_NOFS to > avoid recursion from reclaim context. > > Signed-off-by: Shaohua Li > Reviewed-by: Mark Tinguely > --- > fs/xfs/xfs_super.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: linux/fs/xfs/xfs_super.c > =================================================================== > --- linux.orig/fs/xfs/xfs_super.c 2012-04-13 10:08:26.095496072 +0800 > +++ linux/fs/xfs/xfs_super.c 2012-04-13 10:08:42.555496865 +0800 > @@ -622,7 +622,7 @@ void > xfs_blkdev_issue_flush( > xfs_buftarg_t *buftarg) > { > - blkdev_issue_flush(buftarg->bt_bdev, GFP_KERNEL, NULL); > + blkdev_issue_flush(buftarg->bt_bdev, GFP_NOFS, NULL); > } > > STATIC void Reviewed-by: Dave Chinner -- Dave Chinner david@fromorbit.com _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs