xfs
[Top] [All Lists]

Re: xfs_iext_realloc_indirect and "XFS: possible memory allocation deadl

To: Alex Lyakas <alex@xxxxxxxxxxxxxxxxx>
Subject: Re: xfs_iext_realloc_indirect and "XFS: possible memory allocation deadlock"
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 7 Apr 2016 06:57:37 +1000
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, Danny Shavit <danny@xxxxxxxxxxxxxxxxx>, bfoster@xxxxxxxxxx, Yair Hershko <yair@xxxxxxxxxxxxxxxxx>, Shyam Kaushik <shyam@xxxxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <A01B206564694781A7BE74415E4C6D1E@alyakaslap>
References: <20150629222651.GG7943@dastard> <F1A27B6A9FB048488A388EC4D9FD71F7@alyakaslap> <20150707000911.GT7943@dastard> <20150707090511.GA21863@xxxxxxxxxxxxx> <7792DA2A464640B1BC7220973CED41AE@alyakaslap> <20150723230912.GE3902@dastard> <77693FFEB62A474DA7F039FD92CC5304@alyakaslap> <20160405204106.GF11238@dastard> <A01B206564694781A7BE74415E4C6D1E@alyakaslap>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Apr 06, 2016 at 07:39:21PM +0300, Alex Lyakas wrote:
> Hello Dave,
> 
> Thank you for your response. We understand your concerns and will do
> further testing with the vmalloc alternative.
> 
> Meanwhile, I found another issue happening when files have many
> extents. When unmounting XFS, we call
> xfs_inode_free => xfs_idestroy_fork => xfs_iext_destroy
> This goes over the whole indirection array and calls
> xfs_iext_irec_remove for each one of the erps (from the last one to
> the first one). As a result, we keep shrinking (reallocating
> actually) the indirection array until we shrink out all of its
> elements. When we have files with huge numbers of extents, umount
> takes 30-80 sec, depending on the amount of files that XFS loaded
> and the amount of indirection entries of each file. The unmount
> stack looks like [1].
> 
> That patch in [2] seems to address the issue. Do you think it is
> reasonable? It was tested only on kernel 3.18.19.

Looks like a good optimisation to make. Can you send it as proper
patch (separate thread) with this description and your signed-off-by
on it?

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>