From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Artem Blagodarenko <artem.blagodarenko@gmail.com>
Cc: linux-ext4@vger.kernel.org, alexey.lyashkov@gmail.com,
Andrew Perepechko <andrew.perepechko@seagate.com>
Subject: Re: [PATCH] ext4: preload block group descriptors
Date: Tue, 28 Feb 2017 08:19:56 -0800 [thread overview]
Message-ID: <20170228161956.GE5266@birch.djwong.org> (raw)
In-Reply-To: <1487609153-3367-1-git-send-email-artem.blagodarenko@gmail.com>
On Mon, Feb 20, 2017 at 07:45:53PM +0300, Artem Blagodarenko wrote:
> From: Andrew Perepechko <andrew.perepechko@seagate.com>
>
> With enabled meta_bg option block group descriptors
> reading IO is not sequential and requires optimization.
>
> Signed-off-by: Andrew Perepechko <andrew.perepechko@seagate.com>
> ---
> fs/ext4/super.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index a673558..0e52c91 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -3879,6 +3879,12 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
>
> bgl_lock_init(sbi->s_blockgroup_lock);
>
> + /* Pre-read the descriptors into the buffer cache */
> + for (i = 0; i < db_count; i++) {
> + block = descriptor_loc(sb, logical_sb_block, i);
> + sb_breadahead(sb, block);
> + }
Why does the libext2fs patch start readahead only on the meta bgs
whereas this patch starts it for all of them? I suppose it's just as
well that the kernel prefetches all of them, but I was curious. :)
--D
> +
> for (i = 0; i < db_count; i++) {
> block = descriptor_loc(sb, logical_sb_block, i);
> sbi->s_group_desc[i] = sb_bread_unmovable(sb, block);
> --
> 1.8.3.1
>
next prev parent reply other threads:[~2017-02-28 16:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-20 16:45 [PATCH] ext4: preload block group descriptors Artem Blagodarenko
2017-02-28 16:19 ` Darrick J. Wong [this message]
2017-02-28 16:29 ` Alexey Lyashkov
2017-04-30 4:54 ` Theodore Ts'o
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=20170228161956.GE5266@birch.djwong.org \
--to=darrick.wong@oracle.com \
--cc=alexey.lyashkov@gmail.com \
--cc=andrew.perepechko@seagate.com \
--cc=artem.blagodarenko@gmail.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