From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Josef Bacik <jbacik@fb.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH V2] Btrfs: introduce ticketed enospc infrastructure
Date: Wed, 18 May 2016 07:24:46 -0400 [thread overview]
Message-ID: <1ff146f2-c8e6-1f84-bb03-1f73cc716177@gmail.com> (raw)
In-Reply-To: <1463506255-15918-1-git-send-email-jbacik@fb.com>
On 2016-05-17 13:30, Josef Bacik wrote:
> Our enospc flushing sucks. It is born from a time where we were early
> enospc'ing constantly because multiple threads would race in for the same
> reservation and randomly starve other ones out. So I came up with this solution
> to block any other reservations from happening while one guy tried to flush
> stuff to satisfy his reservation. This gives us pretty good correctness, but
> completely crap latency.
>
> The solution I've come up with is ticketed reservations. Basically we try to
> make our reservation, and if we can't we put a ticket on a list in order and
> kick off an async flusher thread. This async flusher thread does the same old
> flushing we always did, just asynchronously. As space is freed and added back
> to the space_info it checks and sees if we have any tickets that need
> satisfying, and adds space to the tickets and wakes up anything we've satisfied.
>
> Once the flusher thread stops making progress it wakes up all the current
> tickets and tells them to take a hike.
>
> There is a priority list for things that can't flush, since the async flusher
> could do anything we need to avoid deadlocks. These guys get priority for
> having their reservation made, and will still do manual flushing themselves in
> case the async flusher isn't running.
>
> This patch gives us significantly better latencies. Thanks,
>
> Signed-off-by: Josef Bacik <jbacik@fb.com>
I've had this running on my test system (which is _finally_ working
again) for about 16 hours now, nothing is breaking, and a number of the
tests are actually completing marginally faster, so you can add:
Tested-by: Austin S. Hemmelgarn <ahferroin7@gmail.com>
next prev parent reply other threads:[~2016-05-18 11:24 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-25 17:25 [PATCH 00/14] Enospc rework Josef Bacik
2016-03-25 17:25 ` [PATCH 01/14] Btrfs: add bytes_readonly to the spaceinfo at once Josef Bacik
2016-03-25 17:25 ` [PATCH 02/14] Btrfs: fix callers of btrfs_block_rsv_migrate Josef Bacik
2016-03-25 17:25 ` [PATCH 03/14] Btrfs: always reserve metadata for delalloc extents Josef Bacik
2016-03-25 18:04 ` Liu Bo
2016-03-25 17:25 ` [PATCH 04/14] Btrfs: change delayed reservation fallback behavior Josef Bacik
2016-03-25 17:25 ` [PATCH 05/14] Btrfs: warn_on for unaccounted spaces Josef Bacik
2016-06-27 4:47 ` Qu Wenruo
2016-06-27 13:03 ` Chris Mason
2016-06-28 0:16 ` Qu Wenruo
2016-03-25 17:25 ` [PATCH 06/14] Btrfs: add tracepoint for adding block groups Josef Bacik
2016-03-25 17:25 ` [PATCH 07/14] Btrfs: introduce ticketed enospc infrastructure Josef Bacik
2016-05-09 21:29 ` Liu Bo
2016-05-17 17:30 ` [PATCH V2] " Josef Bacik
2016-05-18 11:24 ` Austin S. Hemmelgarn [this message]
2016-05-19 12:47 ` Austin S. Hemmelgarn
2016-05-18 22:46 ` David Sterba
2016-03-25 17:25 ` [PATCH 08/14] Btrfs: trace pinned extents Josef Bacik
2016-03-25 17:25 ` [PATCH 09/14] Btrfs: fix delalloc reservation amount tracepoint Josef Bacik
2016-03-25 17:25 ` [PATCH 10/14] Btrfs: add tracepoints for flush events Josef Bacik
2016-03-25 17:25 ` [PATCH 11/14] Btrfs: add fsid to some tracepoints Josef Bacik
2016-03-25 17:25 ` [PATCH 12/14] Btrfs: fix release reserved extents trace points Josef Bacik
2016-05-09 21:33 ` Liu Bo
2016-03-25 17:25 ` [PATCH 13/14] Btrfs: don't bother kicking async if there's nothing to reclaim Josef Bacik
2016-03-25 17:26 ` [PATCH 14/14] Btrfs: don't do nocow check unless we have to Josef Bacik
2016-03-25 17:50 ` Liu Bo
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=1ff146f2-c8e6-1f84-bb03-1f73cc716177@gmail.com \
--to=ahferroin7@gmail.com \
--cc=jbacik@fb.com \
--cc=linux-btrfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).