From: Christian Brunner <chb@muc.de>
To: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: avoid redundant block group free-space checks
Date: Mon, 12 Dec 2011 21:32:04 +0100 [thread overview]
Message-ID: <CAO47_-_wfpYR_rNZY2S14LYMCm+EyDSJXtJDZrNBoUiyncLGrg@mail.gmail.com> (raw)
In-Reply-To: <ory5uite4g.fsf@livre.localdomain>
2011/12/12 Alexandre Oliva <oliva@lsd.ic.unicamp.br>:
> It was pointed out to me that the test for enough free space in a block
> group was wrong in that it would skip a block group that had most of its
> free space reserved by a cluster.
>
> I offer two mutually exclusive, (so far) very lightly tested patches to
> address this problem.
>
> One moves the test to the middle of the clustered allocation logic,
> between the release of the cluster and the attempt to create a new
> cluster, with some ugliness due to more indentation, locking operations
> and testing.
>
> The other, that I like better but haven't given any significant amount
> of testing yet, only performs the test when we fall back to unclustered
> allocation, relying on btrfs_find_space_cluster to test for enough free
> space early (it does); it also arranges for the cluster in the current
> block group to be released before we try unclustered allocation.
I've chosen to try the second patch in our ceph environment. It seems
that btrfs_find_space_cluster() isn't called any longer.
find_free_extent() is much faster now.
(I think that the write-io numbers are still to high, though.)
Thanks,
Christian
prev parent reply other threads:[~2011-12-12 20:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-12 7:58 avoid redundant block group free-space checks Alexandre Oliva
2011-12-12 20:32 ` Christian Brunner [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=CAO47_-_wfpYR_rNZY2S14LYMCm+EyDSJXtJDZrNBoUiyncLGrg@mail.gmail.com \
--to=chb@muc.de \
--cc=linux-btrfs@vger.kernel.org \
--cc=oliva@lsd.ic.unicamp.br \
/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).