All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Brian Foster <bfoster@redhat.com>
Cc: Avi Kivity <avi@scylladb.com>, linux-xfs@vger.kernel.org
Subject: Re: xfs_extent_busy_flush vs. aio
Date: Fri, 2 Feb 2018 01:48:02 -0800	[thread overview]
Message-ID: <20180202094802.GA17952@infradead.org> (raw)
In-Reply-To: <20180125130830.GD43198@bfoster.bfoster>

On Thu, Jan 25, 2018 at 08:08:31AM -0500, Brian Foster wrote:
> I suppose it's possible that this was some kind of transient state, or
> perhaps only a small set of AGs are affected, etc. It's also possible
> this may have been improved in more recent kernels by Christoph's rework
> of some of that code. In any event, this would probably require a bit
> more runtime analysis to figure out where/why allocations are getting
> stalled as such. I'd probably start by looking at the xfs_extent_busy_*
> tracepoints (also note that if there's potentially something to be
> improved on here, it's more useful to do so against current upstream).
> 
> Or you could just move to something that supports RWF_NOWAIT.. ;)

The way the XFS allocator works has always had a fundamental flaw
since we intorduced the ocncept of busy extents, and that is we need
to lock ourselves into an AG or sometimes even range without taking
said busy extents into account.

The proper fix is to separate the in-core and in-memory data structures
for free space tracking, and only release the busy extents to the
in-memory one once they aren't busy anymore.

Looking into this has been on my todo list for a long time, but I
never go to it.

      parent reply	other threads:[~2018-02-02  9:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-23 14:57 xfs_extent_busy_flush vs. aio Avi Kivity
2018-01-23 15:28 ` Brian Foster
2018-01-23 15:45   ` Avi Kivity
2018-01-23 16:11     ` Brian Foster
2018-01-23 16:22       ` Avi Kivity
2018-01-23 16:47         ` Brian Foster
2018-01-23 17:00           ` Avi Kivity
2018-01-23 17:39             ` Brian Foster
2018-01-25  8:50               ` Avi Kivity
2018-01-25 13:08                 ` Brian Foster
2018-01-29  9:40                   ` Avi Kivity
2018-01-29 11:35                     ` Dave Chinner
2018-01-29 11:44                       ` Avi Kivity
2018-01-29 21:56                         ` Dave Chinner
2018-01-30  8:58                           ` Avi Kivity
2018-02-06 14:10                           ` Avi Kivity
2018-02-07  1:57                             ` Dave Chinner
2018-02-07 10:54                               ` Avi Kivity
2018-02-07 23:43                                 ` Dave Chinner
2018-02-02  9:48                   ` Christoph Hellwig [this message]

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=20180202094802.GA17952@infradead.org \
    --to=hch@infradead.org \
    --cc=avi@scylladb.com \
    --cc=bfoster@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.