From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2992533Ab2KAVaV (ORCPT ); Thu, 1 Nov 2012 17:30:21 -0400 Received: from relay2.sgi.com ([192.48.179.30]:39471 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2992467Ab2KAVaS (ORCPT ); Thu, 1 Nov 2012 17:30:18 -0400 Date: Thu, 1 Nov 2012 16:30:10 -0500 From: Ben Myers To: Dave Chinner Cc: Torsten Kaiser , Linux Kernel , xfs@oss.sgi.com Subject: Re: Hang in XFS reclaim on 3.7.0-rc3 Message-ID: <20121101213010.GD9783@sgi.com> References: <20121029222613.GU29378@dastard> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20121029222613.GU29378@dastard> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dave, On Tue, Oct 30, 2012 at 09:26:13AM +1100, Dave Chinner wrote: > On Mon, Oct 29, 2012 at 09:03:15PM +0100, Torsten Kaiser wrote: > > After experiencing a hang of all IO yesterday ( > > http://marc.info/?l=linux-kernel&m=135142236520624&w=2 ), I turned on > > LOCKDEP after upgrading to -rc3. > > > > I then tried to replicate the load that hung yesterday and got the > > following lockdep report, implicating XFS instead of by stacking swap > > onto dm-crypt and md. > > > > [ 2844.971913] > > [ 2844.971920] ================================= > > [ 2844.971921] [ INFO: inconsistent lock state ] > > [ 2844.971924] 3.7.0-rc3 #1 Not tainted > > [ 2844.971925] --------------------------------- > > [ 2844.971927] inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} usage. > > [ 2844.971929] kswapd0/725 [HC0[0]:SC0[0]:HE1:SE1] takes: > > [ 2844.971931] (&(&ip->i_lock)->mr_lock){++++?.}, at: [] xfs_ilock+0x84/0xb0 > > [ 2844.971941] {RECLAIM_FS-ON-W} state was registered at: > > [ 2844.971942] [] mark_held_locks+0x7e/0x130 > > [ 2844.971947] [] lockdep_trace_alloc+0x63/0xc0 > > [ 2844.971949] [] kmem_cache_alloc+0x35/0xe0 > > [ 2844.971952] [] vm_map_ram+0x271/0x770 > > [ 2844.971955] [] _xfs_buf_map_pages+0x46/0xe0 > > [ 2844.971959] [] xfs_buf_get_map+0x8a/0x130 > > [ 2844.971961] [] xfs_trans_get_buf_map+0xa9/0xd0 > > [ 2844.971964] [] xfs_ifree_cluster+0x129/0x670 > > [ 2844.971967] [] xfs_ifree+0xe9/0xf0 > > [ 2844.971969] [] xfs_inactive+0x2af/0x480 > > [ 2844.971972] [] xfs_fs_evict_inode+0x70/0x80 > > [ 2844.971974] [] evict+0xaf/0x1b0 > > [ 2844.971977] [] iput+0x105/0x210 > > [ 2844.971979] [] dentry_iput+0xa0/0xe0 > > [ 2844.971981] [] dput+0x150/0x280 > > [ 2844.971983] [] sys_renameat+0x21b/0x290 > > [ 2844.971986] [] sys_rename+0x16/0x20 > > [ 2844.971988] [] system_call_fastpath+0x16/0x1b > > We shouldn't be mapping pages there. See if the patch below fixes > it. > > Fundamentally, though, the lockdep warning has come about because > vm_map_ram is doing a GFP_KERNEL allocation when we need it to be > doing GFP_NOFS - we are within a transaction here, so memory reclaim > is not allowed to recurse back into the filesystem. > > mm-folk: can we please get this vmalloc/gfp_flags passing API > fixed once and for all? This is the fourth time in the last month or > so that I've seen XFS bug reports with silent hangs and associated > lockdep output that implicate GFP_KERNEL allocations from vm_map_ram > in GFP_NOFS conditions as the potential cause.... > > Cheers, > > Dave. > -- > Dave Chinner > david@fromorbit.com > > xfs: don't vmap inode cluster buffers during free Could you write up a little more background for the commit message? Regards, Ben From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id qA1LSOJS055218 for ; Thu, 1 Nov 2012 16:28:24 -0500 Date: Thu, 1 Nov 2012 16:30:10 -0500 From: Ben Myers Subject: Re: Hang in XFS reclaim on 3.7.0-rc3 Message-ID: <20121101213010.GD9783@sgi.com> References: <20121029222613.GU29378@dastard> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20121029222613.GU29378@dastard> 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: Dave Chinner Cc: Linux Kernel , Torsten Kaiser , xfs@oss.sgi.com Hi Dave, On Tue, Oct 30, 2012 at 09:26:13AM +1100, Dave Chinner wrote: > On Mon, Oct 29, 2012 at 09:03:15PM +0100, Torsten Kaiser wrote: > > After experiencing a hang of all IO yesterday ( > > http://marc.info/?l=linux-kernel&m=135142236520624&w=2 ), I turned on > > LOCKDEP after upgrading to -rc3. > > > > I then tried to replicate the load that hung yesterday and got the > > following lockdep report, implicating XFS instead of by stacking swap > > onto dm-crypt and md. > > > > [ 2844.971913] > > [ 2844.971920] ================================= > > [ 2844.971921] [ INFO: inconsistent lock state ] > > [ 2844.971924] 3.7.0-rc3 #1 Not tainted > > [ 2844.971925] --------------------------------- > > [ 2844.971927] inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} usage. > > [ 2844.971929] kswapd0/725 [HC0[0]:SC0[0]:HE1:SE1] takes: > > [ 2844.971931] (&(&ip->i_lock)->mr_lock){++++?.}, at: [] xfs_ilock+0x84/0xb0 > > [ 2844.971941] {RECLAIM_FS-ON-W} state was registered at: > > [ 2844.971942] [] mark_held_locks+0x7e/0x130 > > [ 2844.971947] [] lockdep_trace_alloc+0x63/0xc0 > > [ 2844.971949] [] kmem_cache_alloc+0x35/0xe0 > > [ 2844.971952] [] vm_map_ram+0x271/0x770 > > [ 2844.971955] [] _xfs_buf_map_pages+0x46/0xe0 > > [ 2844.971959] [] xfs_buf_get_map+0x8a/0x130 > > [ 2844.971961] [] xfs_trans_get_buf_map+0xa9/0xd0 > > [ 2844.971964] [] xfs_ifree_cluster+0x129/0x670 > > [ 2844.971967] [] xfs_ifree+0xe9/0xf0 > > [ 2844.971969] [] xfs_inactive+0x2af/0x480 > > [ 2844.971972] [] xfs_fs_evict_inode+0x70/0x80 > > [ 2844.971974] [] evict+0xaf/0x1b0 > > [ 2844.971977] [] iput+0x105/0x210 > > [ 2844.971979] [] dentry_iput+0xa0/0xe0 > > [ 2844.971981] [] dput+0x150/0x280 > > [ 2844.971983] [] sys_renameat+0x21b/0x290 > > [ 2844.971986] [] sys_rename+0x16/0x20 > > [ 2844.971988] [] system_call_fastpath+0x16/0x1b > > We shouldn't be mapping pages there. See if the patch below fixes > it. > > Fundamentally, though, the lockdep warning has come about because > vm_map_ram is doing a GFP_KERNEL allocation when we need it to be > doing GFP_NOFS - we are within a transaction here, so memory reclaim > is not allowed to recurse back into the filesystem. > > mm-folk: can we please get this vmalloc/gfp_flags passing API > fixed once and for all? This is the fourth time in the last month or > so that I've seen XFS bug reports with silent hangs and associated > lockdep output that implicate GFP_KERNEL allocations from vm_map_ram > in GFP_NOFS conditions as the potential cause.... > > Cheers, > > Dave. > -- > Dave Chinner > david@fromorbit.com > > xfs: don't vmap inode cluster buffers during free Could you write up a little more background for the commit message? Regards, Ben _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs