From: Dmitry Monakhov <dmonakhov@openvz.org>
To: Jan Kara <jack@suse.cz>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 3/3] ext4: optimize block allocation on grow indepth
Date: Tue, 23 Sep 2014 14:26:01 +0400 [thread overview]
Message-ID: <87fvfizl8m.fsf@openvz.org> (raw)
In-Reply-To: <20140923100031.GD2359@quack.suse.cz>
On Tue, 23 Sep 2014 12:00:31 +0200, Jan Kara <jack@suse.cz> wrote:
> On Tue 23-09-14 11:02:32, Dmitry Monakhov wrote:
> > It is reasonable to prepent newly created index to older one.
> ...
> > - newblock = ext4_ext_new_meta_block(handle, inode, NULL,
> > - newext, &err, flags);
> > + /* Try to prepend new index to old one */
> > + if (ext_depth(inode))
> > + goal = ext4_idx_pblock(EXT_FIRST_INDEX(ext_inode_hdr(inode)));
> > + if (goal > le32_to_cpu(es->s_first_data_block)) {
> > + flags |= EXT4_MB_HINT_TRY_GOAL;
> > + goal--;
> > + } else
> > + goal = ext4_inode_to_goal_block(inode);
> > + newblock = ext4_new_meta_blocks(handle, inode, goal, flags,
> > + NULL, &err);
> > if (newblock == 0)
> > return err;
> Hum, did you actually observe any improvement in file layout with this
> patch?
Hmmm.... well this patch itself unlikely result in improvements because
the block we asks is likely used already. This is because non optimal block
allocation for mdata. I hope to fix it once we start working on ideas
which was described in "fast fsck" tread
(http://comments.gmane.org/gmane.comp.file-systems.ext4/41472)
>
> Honza
> --
> Jan Kara <jack@suse.cz>
> SUSE Labs, CR
next prev parent reply other threads:[~2014-09-23 10:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-23 7:02 [PATCH 1/3] ext4: fix over-defensive complain after journal abort Dmitry Monakhov
2014-09-23 7:02 ` [PATCH 2/3] ext4: get rid of code duplication Dmitry Monakhov
2014-09-23 9:54 ` Jan Kara
2014-10-02 2:27 ` Theodore Ts'o
2014-09-23 7:02 ` [PATCH 3/3] ext4: optimize block allocation on grow indepth Dmitry Monakhov
2014-09-23 10:00 ` Jan Kara
2014-09-23 10:26 ` Dmitry Monakhov [this message]
2014-10-02 2:52 ` Theodore Ts'o
2014-10-02 2:24 ` [PATCH 1/3] ext4: fix over-defensive complain after journal abort 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=87fvfizl8m.fsf@openvz.org \
--to=dmonakhov@openvz.org \
--cc=jack@suse.cz \
--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 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.