| To: | Dave Chinner <david@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [RFC]xfs: using GFP_NOFS for blkdev_issue_flush |
| From: | Shaohua Li <shli@xxxxxxxxxx> |
| Date: | Tue, 24 Apr 2012 21:23:46 +0800 |
| Cc: | xfs@xxxxxxxxxxx, hch@xxxxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=GQyhAleMzzKQaWk7dP5obMihpDh9qNUiG/ykkpIf724=; b=oPCBOVx0ulF+1n25nJ7PQdtkhmv5BcQCTV+XLkALUbweexUhKZFXevP+jFJZQDj0H5 DlJs/E2646xqNeTbEN6qmE57nuFdBbBp8eEyv9rJU1SAE6T7LZ0oDg1J2elSH+x+ZGhS SD4KEul+cAjuRVf0xGQaeqa1VhiOdlvm5c/afes5qwjGO7K5/3LYfI4iJw0ipBmSDRxX tykBmlLWJuBZXvpHFvpINir/QhGwD/DAuOYBtJ0uCDH2roSMPLgANbUB0Rnz+EfSlP+d IKi3SnKVCpld+gjFIBTOvf0yewp7RZZMPtHl75r/FipiUU01DotU3AsqSLG65uJcm/ml HE7g== |
| In-reply-to: | <20120418013746.GL6734@dastard> |
| References: | <4F8BC112.9090508@xxxxxxxxxxxx> <4F8BC30D.5040601@xxxxxxxxxx> <20120418013746.GL6734@dastard> |
| Sender: | Shaohua Li <shlikernel@xxxxxxxxx> |
| User-agent: | Mutt/1.4.2.3i |
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 <shli@xxxxxxxxxxxx>
Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>
---
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
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Still seeing hangs in xlog_grant_log_space, Dave Chinner |
|---|---|
| Next by Date: | Re: task blocked for more than 120 seconds, Josef 'Jeff' Sipek |
| Previous by Thread: | Re: [RFC]xfs: using GFP_NOFS for blkdev_issue_flush, Dave Chinner |
| Next by Thread: | Re: [RFC]xfs: using GFP_NOFS for blkdev_issue_flush, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |