From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:47034 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750862AbdEDM3w (ORCPT ); Thu, 4 May 2017 08:29:52 -0400 Date: Thu, 4 May 2017 08:29:50 -0400 From: Brian Foster Subject: Re: xfs_alloc_ag_vextent_near() takes minutes to complete Message-ID: <20170504122950.GC3248@bfoster.bfoster> References: <49A20782FA8B4C82B0393E5BEF8A8754@alyakaslap> <20170502073501.GB6679@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: Alex Lyakas Cc: Christoph Hellwig , linux-xfs@vger.kernel.org On Thu, May 04, 2017 at 02:13:40PM +0300, Alex Lyakas wrote: > Hello, > > > # it is still not clear who is holding the lock > Further analysis shows that the xfs_buf lock is being held, because > the buffer is currently being read from disk. The stack that unlocks > the buffer is [1]. The size of each buffer being read is 4Kb. > > So bottom line is that sometimes XFS needs to search through thousands > of metadata blocks of 4Kb, and needs to wait while they are being read > from disk. This causes very slow allocation in some cases, further > causing other threads to wait on i_lock/i_mutex, in some cases > triggering hung-task panics. > Not that this helps resolve the fundamental problem, but note that I don't think hung task messages have to result in kernel panics. On a quick look at v3.18, the CONFIG_BOOTPARAM_HUNG_TASK_PANIC kernel config option looks like it determines whether a hung task message panics the kernel or not. Brian > Anything can be done to remedy this? > > Thanks, > Alex. > > > > [1] > Call Trace: > [] dump_stack+0x4e/0x71 > [] xfs_buf_ioend+0x22b/0x230 [xfs] > [] xfs_buf_ioend_work+0x15/0x20 [xfs] > [] process_one_work+0x146/0x410 > [] worker_thread+0x121/0x450 > [] ? process_one_work+0x410/0x410 > [] kthread+0xc9/0xe0 > [] ? kthread_create_on_node+0x180/0x180 > [] ret_from_fork+0x58/0x90 > [] ? kthread_create_on_node+0x180/0x180 > -- > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html