From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: linux-nfs-owner@vger.kernel.org Received: from ipmail06.adl6.internode.on.net ([150.101.137.145]:28161 "EHLO ipmail06.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754524AbaDPGSg (ORCPT ); Wed, 16 Apr 2014 02:18:36 -0400 Date: Wed, 16 Apr 2014 16:18:20 +1000 From: Dave Chinner To: NeilBrown Cc: linux-mm@kvack.org, linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, xfs@oss.sgi.com Subject: Re: [PATCH 19/19] XFS: set PF_FSTRANS while ilock is held in xfs_free_eofblocks Message-ID: <20140416061819.GF15995@dastard> References: <20140416033623.10604.69237.stgit@notabene.brown> <20140416040337.10604.7488.stgit@notabene.brown> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20140416040337.10604.7488.stgit@notabene.brown> Sender: linux-nfs-owner@vger.kernel.org List-ID: On Wed, Apr 16, 2014 at 02:03:37PM +1000, NeilBrown wrote: > memory allocates can happen while the xfs ilock is held in > xfs_free_eofblocks, particularly > > [] kmem_zone_alloc+0x67/0xc0 > [] xfs_trans_add_item+0x25/0x50 > [] xfs_trans_ijoin+0x2c/0x60 > [] xfs_itruncate_extents+0xbe/0x400 > [] xfs_free_eofblocks+0x1c4/0x240 > > So set PF_FSTRANS to avoid this causing a deadlock. Another "You broke KM_NOFS" moment. You win a Kit Kat. ;) xfs_trans_add_item(): lidp = kmem_zone_zalloc(xfs_log_item_desc_zone, KM_SLEEP | KM_NOFS); KM_NOFS needs to work, otherwise XFS is just a huge steaming pile of memory reclaim deadlocks regardless of whether you are using loopback NFS or not. Cheers, Dave. -- Dave Chinner david@fromorbit.com From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (Postfix) with ESMTP id 056C67F37 for ; Wed, 16 Apr 2014 01:18:42 -0500 (CDT) Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by relay1.corp.sgi.com (Postfix) with ESMTP id C5A718F8039 for ; Tue, 15 Apr 2014 23:18:38 -0700 (PDT) Received: from ipmail06.adl6.internode.on.net (ipmail06.adl6.internode.on.net [150.101.137.145]) by cuda.sgi.com with ESMTP id LE1ExLfccMlWi5LA for ; Tue, 15 Apr 2014 23:18:35 -0700 (PDT) Date: Wed, 16 Apr 2014 16:18:20 +1000 From: Dave Chinner Subject: Re: [PATCH 19/19] XFS: set PF_FSTRANS while ilock is held in xfs_free_eofblocks Message-ID: <20140416061819.GF15995@dastard> References: <20140416033623.10604.69237.stgit@notabene.brown> <20140416040337.10604.7488.stgit@notabene.brown> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140416040337.10604.7488.stgit@notabene.brown> 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 Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: NeilBrown Cc: linux-mm@kvack.org, linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, xfs@oss.sgi.com On Wed, Apr 16, 2014 at 02:03:37PM +1000, NeilBrown wrote: > memory allocates can happen while the xfs ilock is held in > xfs_free_eofblocks, particularly > > [] kmem_zone_alloc+0x67/0xc0 > [] xfs_trans_add_item+0x25/0x50 > [] xfs_trans_ijoin+0x2c/0x60 > [] xfs_itruncate_extents+0xbe/0x400 > [] xfs_free_eofblocks+0x1c4/0x240 > > So set PF_FSTRANS to avoid this causing a deadlock. Another "You broke KM_NOFS" moment. You win a Kit Kat. ;) xfs_trans_add_item(): lidp = kmem_zone_zalloc(xfs_log_item_desc_zone, KM_SLEEP | KM_NOFS); KM_NOFS needs to work, otherwise XFS is just a huge steaming pile of memory reclaim deadlocks regardless of whether you are using loopback NFS or not. Cheers, Dave. -- Dave Chinner david@fromorbit.com _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com [209.85.160.53]) by kanga.kvack.org (Postfix) with ESMTP id 725396B0069 for ; Wed, 16 Apr 2014 02:18:53 -0400 (EDT) Received: by mail-pb0-f53.google.com with SMTP id rp16so10381072pbb.26 for ; Tue, 15 Apr 2014 23:18:53 -0700 (PDT) Received: from ipmail06.adl6.internode.on.net (ipmail06.adl6.internode.on.net. [2001:44b8:8060:ff02:300:1:6:6]) by mx.google.com with ESMTP id fn10si11230727pad.320.2014.04.15.23.18.51 for ; Tue, 15 Apr 2014 23:18:52 -0700 (PDT) Date: Wed, 16 Apr 2014 16:18:20 +1000 From: Dave Chinner Subject: Re: [PATCH 19/19] XFS: set PF_FSTRANS while ilock is held in xfs_free_eofblocks Message-ID: <20140416061819.GF15995@dastard> References: <20140416033623.10604.69237.stgit@notabene.brown> <20140416040337.10604.7488.stgit@notabene.brown> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140416040337.10604.7488.stgit@notabene.brown> Sender: owner-linux-mm@kvack.org List-ID: To: NeilBrown Cc: linux-mm@kvack.org, linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, xfs@oss.sgi.com On Wed, Apr 16, 2014 at 02:03:37PM +1000, NeilBrown wrote: > memory allocates can happen while the xfs ilock is held in > xfs_free_eofblocks, particularly > > [] kmem_zone_alloc+0x67/0xc0 > [] xfs_trans_add_item+0x25/0x50 > [] xfs_trans_ijoin+0x2c/0x60 > [] xfs_itruncate_extents+0xbe/0x400 > [] xfs_free_eofblocks+0x1c4/0x240 > > So set PF_FSTRANS to avoid this causing a deadlock. Another "You broke KM_NOFS" moment. You win a Kit Kat. ;) xfs_trans_add_item(): lidp = kmem_zone_zalloc(xfs_log_item_desc_zone, KM_SLEEP | KM_NOFS); KM_NOFS needs to work, otherwise XFS is just a huge steaming pile of memory reclaim deadlocks regardless of whether you are using loopback NFS or not. Cheers, Dave. -- Dave Chinner david@fromorbit.com -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org