From: Brian Foster <bfoster@redhat.com> To: Christoph Hellwig <hch@lst.de> Cc: linux-xfs@vger.kernel.org, michaelcallahan@fb.com Subject: Re: [PATCH 1/3] xfs: fix the AG loop in xfs_alloc_vextent for busy extents Date: Fri, 21 Oct 2016 10:41:33 -0400 [thread overview] Message-ID: <20161021144133.GA54851@bfoster.bfoster> (raw) In-Reply-To: <20161021124824.GA17667@lst.de> On Fri, Oct 21, 2016 at 02:48:24PM +0200, Christoph Hellwig wrote: > On Wed, Oct 19, 2016 at 09:48:08AM -0400, Brian Foster wrote: > > > if (args->agbp) { > > > - if ((error = xfs_alloc_ag_vextent(args))) > > > + error = xfs_alloc_ag_vextent(args); > > > + if (error) > > > goto error0; > > > - break; > > > + if (args->agbno != NULLAGBLOCK) > > > + break; > > > + xfs_trans_brelse(args->tp, args->agbp); > > > > How is this safe with respect to xfs_alloc_fix_freelist() potentially > > dirtying the agf? Haven't we had deadlock and/or other problems due to > > xfs_alloc_fix_freelist() succeeding when an allocation ultimately fails, > > and subsequently rotating to a potentially lower agno? > > We've had the case where the allocation would fail despite > xfs_alloc_fix_freelist succeeding forever, it's just that with > discard in general and async discard in particular we can hit it > much more easily. > Perhaps, but I think that is beside the point. IME, any time that has resulted in such a deadlock, we attribute it to the fact that xfs_alloc_fix_freelist() succeeded in a case where it shouldn't have. I don't think we should introduce more of such cases if we can help it. > The only way to make the allocation no fail if xfs_alloc_fix_freelist > succeeded would be to force out any busy extents at the low level > if we are tigh on space, I'll have to see how doable that would be. > > The other option would be to roll around the transaction when switching > to a different AG so that we can release the locks. That sounds a lot > easier, and also less fragile in the long run. That sounds reasonable provided we don't have any partial modifications or whatnot in the transaction. Another angle might be to find a way to take the busy extents into consideration before xfs_alloc_fix_freelist() actually makes any changes, but I also don't know how straightforward that might be either. Brian > -- > 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
next prev parent reply other threads:[~2016-10-21 14:41 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-10-17 20:22 discard improvements Christoph Hellwig 2016-10-17 20:22 ` [PATCH 1/3] xfs: fix the AG loop in xfs_alloc_vextent for busy extents Christoph Hellwig 2016-10-19 13:48 ` Brian Foster 2016-10-21 12:48 ` Christoph Hellwig 2016-10-21 14:41 ` Brian Foster [this message] 2016-11-08 6:15 ` Dave Chinner 2016-11-10 19:17 ` Christoph Hellwig 2016-10-17 20:22 ` [PATCH 2/3] xfs: don't block the log commit handler for discards Christoph Hellwig 2016-10-17 23:29 ` Dave Chinner 2016-10-18 5:05 ` Christoph Hellwig 2016-10-19 10:58 ` Christoph Hellwig 2016-10-28 16:16 ` Michael Callahan 2016-10-31 15:16 ` Christoph Hellwig 2016-10-17 20:22 ` [PATCH 3/3] xfs: merge discard requests Christoph Hellwig 2016-10-28 10:11 ` discard improvements Avi Kivity 2016-10-31 15:14 ` Christoph Hellwig 2016-11-05 18:18 ` Avi Kivity 2016-11-06 16:36 ` Christoph Hellwig 2016-11-06 23:21 ` Dave Chinner
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20161021144133.GA54851@bfoster.bfoster \ --to=bfoster@redhat.com \ --cc=hch@lst.de \ --cc=linux-xfs@vger.kernel.org \ --cc=michaelcallahan@fb.com \ --subject='Re: [PATCH 1/3] xfs: fix the AG loop in xfs_alloc_vextent for busy extents' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.