From: Ted Ts'o <tytso@mit.edu>
To: Lukas Czerner <lczerner@redhat.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: ext4_trim_fs() load buddy only when it is needed
Date: Tue, 24 May 2011 18:18:18 -0400 [thread overview]
Message-ID: <20110524221818.GH26055@thunk.org> (raw)
In-Reply-To: <1303144351-15614-1-git-send-email-lczerner@redhat.com>
On Mon, Apr 18, 2011 at 06:32:31PM +0200, Lukas Czerner wrote:
> Currently we are loading buddy ext4_mb_load_buddy() for every block
> group we are going through in ext4_trim_fs() in many cases just to find
> out that there is not enough space to be bothered with. As Amir Goldstein
> suggested we can use bb_free information directly from ext4_group_info.
>
> This commit removes ext4_mb_load_buddy() from ext4_trim_fs() and rather
> get the ext4_group_info via ext4_get_group_info() and use the bb_free
> information directly from that. This avoids unnecessary call to load
> buddy in the case the group does not have enough free space to trim.
> Loading buddy is now moved to ext4_trim_all_free().
>
> Tested by me with xfstests 251.
>
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>
I just added this patch to the ext4 tree. Apologies for not noticing
it earlier. I had to make a few adjustments to make the patch apply,
but nothing major.
- Ted
prev parent reply other threads:[~2011-05-24 22:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-18 16:32 [PATCH] ext4: ext4_trim_fs() load buddy only when it is needed Lukas Czerner
2011-04-19 19:16 ` Amir Goldstein
2011-04-21 9:36 ` Lukas Czerner
2011-04-21 10:26 ` [PATCH] ext4: protect bb_first_free in ext4_trim_all_free() with group lock Lukas Czerner
[not found] ` <20110421110120.GB11901@bitwizard.nl>
2011-04-21 11:10 ` Lukas Czerner
2011-05-24 22:32 ` Ted Ts'o
2011-05-24 22:18 ` Ted Ts'o [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=20110524221818.GH26055@thunk.org \
--to=tytso@mit.edu \
--cc=lczerner@redhat.com \
--cc=linux-ext4@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).