From: Zheng Liu <gnehzuil.liu@gmail.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org, Zheng Liu <wenqing.lz@taobao.com>,
Jan kara <jack@suse.cz>, Dmitry Monakhov <dmonakhov@openvz.org>
Subject: Re: [PATCH 00/10 v5] ext4: extent status tree (step2)
Date: Sun, 10 Feb 2013 16:40:07 +0800 [thread overview]
Message-ID: <20130210084007.GA14075@gmail.com> (raw)
In-Reply-To: <20130210013857.GA8526@thunk.org>
Hi Ted,
On Sat, Feb 09, 2013 at 08:38:57PM -0500, Theodore Ts'o wrote:
> Hi Zheng,
>
> Thanks for working on this! I've included your v5 extent status tree
> patches into the ext4 dev tree. I will start doing further testing.
>
> I suspected it wouldn't make a different, but I tested and confirmed
> that your patches don't help fix the regression introduced by the
> patch: disable-merging-of-uninitialized-extents
>
> As a result, I've moved the following patches to the unstable portion
> of the ext4 patch queue, pending further investigation and discussion:
>
> disable-merging-of-uninitialized-extents
> remove-unnecessary-wait-for-extent-coversion-in-ext4_fallocate
> ext4_split_extent_should_take_care_of_extent_zeroout
>
> I will be running a full set of tests and looking more deeply at the
> patches, but for now I want to get them into linux-next for more
> testing and review.
I have seen that the patch series has been merged into 'dev' branch of
ext4 repo. But I found a problem that a chunk in patch 9/10 is missing
in your branch. In that patch ext4_map_blocks is replaced with
ext4_ext_map_blocks because when we call ext4_map_blocks to convert
unwritten extents it will fail. In ext4_map_blocks it first tries
to lookup extent status tree and the unwritten extent in this tree has
been converted in end_io callback function. So that means that
ext4_map_blocks will return immediately and unwritten extent in disk
will never be converted. I have replied a mail for that patch to
describe it. Please check it.
Thanks,
- Zheng
> On Fri, Feb 08, 2013 at 04:43:56PM +0800, Zheng Liu wrote:
> > Hi all,
> >
> > This is my fifth try to implement the second step of extent status tree.
> > The patch set can be divided into the following parts.
> >
> > Patch 1/10
> > This patch refines the extent status tree
> >
> > Patch 2/10-6/10
> > These patches try to track all extent status in extent status tree and
> > make it as a extent cache. In extent_status structure bit field is removed
> > because we get some warnings from 'sparse'. Now es_pblk and es_status are
> > manipulated by ext4_es_*_pblock and ext4_es_*_status directly. Currently
> > when an unwritten extent is allocated, we never know it from map->m_flags
> > because ext4_ext_map_blocks doesn't return EXT4_MAP_UNWRITTEN flag. A
> > patch fixes it and we can determine the extent status according to m_flags.
> > According to Jan's feedback, we put the hole into extent cache to avoid
> > to access extent tree in disk as far as possible. Here if the whole file
> > is a hole, this hole will not be cached in extent status tree because it
> > is always splitted immediately. Meanwhile the hole will not be cached
> > when ext4_da_map_blocks looks up a block mapping because this hole will be
> > as a delayed extent later.
> >
> > Patch 7/10-8/10
> > This two patches try to reclaim memory from extent status tree when we
> > are under a high memeory pressure.
> >
> > Patch 9/10-10/10
> > Thses patches are picked up again from 1st version because I aware that
> > they could remove a bogus wait in ext4_ind_direct_IO when dioread_nolock
> > is enabled. After applied them, the latency of dio read can be reduced.
> >
> > I measure it using fio and the result shows as below.
> >
> > config file
> > -----------
> > [global]
> > ioengine=psync
> > direct=1
> > bs=4k
> > thread
> > group_reporting
> > directory=/mnt/sda1/
> > filename=testfile
> > filesize=10g
> > size=10g
> > runtime=120
> > iodepth=16
> >
> > [fio]
> > rw=randrw
> > numjobs=4
> >
> > result
> > ------
> > w/ bogus wait
> > read : io=1508.1MB, bw=12876KB/s, iops=3218 , runt=120001msec
> > clat (usec): min=128 , max=268738 , avg=718.62, stdev=3703.97
> > lat (usec): min=128 , max=268739 , avg=718.78, stdev=3703.97
> > write: io=1505.2MB, bw=12843KB/s, iops=3210 , runt=120001msec
> > clat (usec): min=47 , max=991727 , avg=520.94, stdev=3451.63
> > lat (usec): min=47 , max=991727 , avg=521.31, stdev=3451.63
> >
> > w/o bogus wait
> > read : io=1576.4MB, bw=13451KB/s, iops=3362 , runt=120001msec
> > clat (usec): min=128 , max=283906 , avg=685.88, stdev=2762.64
> > lat (usec): min=128 , max=283907 , avg=686.05, stdev=2762.64
> > write: io=1577.9MB, bw=13458KB/s, iops=3364 , runt=120001msec
> > clat (usec): min=48 , max=977942 , avg=498.97, stdev=3093.08
> > lat (usec): min=48 , max=977943 , avg=499.33, stdev=3093.08
> >
> > From the result we can see that the avg. of latency could be reduced a little.
> >
> > changelog:
> > v5 <- v4:
> > - drop a patch that removes EXT4_MAP_FROM_CLUSTER flag
> > (I will revise it in the patch set of get_block_t refinement)
> > - fold original patch 3/9 into patch 4/9
> > - manipulate es_pblk and es_status directly
> > (bit field is removed because it causes some warnings from 'sparse')
> > - let ext4_ext_map_blocks return EXT4_MAP_UNWRITTEN flag
> > - rename ext4_es_find_extent with ext4_es_find_delayed_extent
> > - add hole status and put hole into extent status tree as a cache
> > - convert unwritten extents from extent status tree in ext4_ext_direct_IO
> > and end_io callback
> > - remove a bogus wait in ext4_ind_direct_IO when dioread_nolock is enabled
> >
> > v4 <- v3:
> > - register a normal shrinker to reclaim extent from extent status tree
> >
> > v3 <- v2:
> > - use prune_super() to reclaim extents from extent status tree
> > - stashed es_status into es_pblk
> > - remove single extent cache
> > - rebase against 3.8-rc4
> >
> > v2 <- v1:
> > - drop patches that try to improve unwritten extent conversion
> > - remove EXT4_MAP_FROM_CLUSTER flag
> > - add tracepoint for ext4_es_lookup_extent()
> > - drop a patch, which tries to fix a warning when bigalloc and delalloc
> > are enabled
> > - add a shrinker to reclaim memory from extent status tree
> > - rebase against 3.8-rc2
> >
> > v4: http://lwn.net/Articles/536037/
> > v3: http://lwn.net/Articles/533730/
> > v2: http://lwn.net/Articles/532446/
> > v1: http://lwn.net/Articles/531065/
> >
> > As always, any comments or feedbacks are welcome.
> >
> > FWIW, when I try to implement patch 3/10, I realize that get_block_t and
> > *_map_blocks functions need to be refactored because in ext4 we already
> > have six get_block_t functions
> > - ext4_get_block
> > - ext4_get_block_write
> > - ext4_get_block_write_nolock
> > - noalloc_get_block_write
> > - ext4_da_get_block_prep
> > - _ext4_get_block
> >
> > and four *_map_blocks
> > - ext4_map_blocks
> > - ext4_da_map_blocks
> > - ext4_ext_map_blocks
> > - ext4_ind_map_blocks
> >
> > So I am planning to refine them. First I will try to split ext4_map_blocks
> > into two parts, e.g. ext4_map_blocks_read and ext4_map_blocks_write, and
> > then try other cleanups and improvmentes.
> >
> > Thanks,
> > - Zheng
> >
> > Zheng Liu (10):
> > ext4: refine extent status tree
> > ext4: add physical block and status member into extent status tree
> > ext4: let ext4_ext_map_blocks return EXT4_MAP_UNWRITTEN flag
> > ext4: track all extent status in extent status tree
> > ext4: lookup block mapping in extent status tree
> > ext4: remove single extent cache
> > ext4: adjust some functions for reclaiming extents from extent status
> > tree
> > ext4: reclaim extents from extent status tree
> > ext4: convert unwritten extents from extent status tree in end_io
> > ext4: remove bogus wait for unwritten extents in ext4_ind_direct_IO
> >
> > fs/ext4/ext4.h | 21 +-
> > fs/ext4/ext4_extents.h | 6 -
> > fs/ext4/extents.c | 211 ++++--------
> > fs/ext4/extents_status.c | 779 +++++++++++++++++++++++++++++++++++---------
> > fs/ext4/extents_status.h | 84 ++++-
> > fs/ext4/file.c | 16 +-
> > fs/ext4/indirect.c | 5 -
> > fs/ext4/inode.c | 148 +++++++--
> > fs/ext4/move_extent.c | 3 -
> > fs/ext4/page-io.c | 8 +-
> > fs/ext4/super.c | 8 +-
> > include/trace/events/ext4.h | 207 ++++++++++--
> > 12 files changed, 1075 insertions(+), 421 deletions(-)
> >
> > --
> > 1.7.12.rc2.18.g61b472e
> >
prev parent reply other threads:[~2013-02-10 8:25 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-08 8:43 [PATCH 00/10 v5] ext4: extent status tree (step2) Zheng Liu
2013-02-08 8:43 ` [PATCH 01/10 v5] ext4: refine extent status tree Zheng Liu
2013-02-08 15:35 ` Jan Kara
2013-02-15 6:38 ` Zheng Liu
2013-02-08 8:43 ` [PATCH 02/10 v5] ext4: add physical block and status member into " Zheng Liu
2013-02-08 15:39 ` Jan Kara
2013-02-08 8:43 ` [PATCH 03/10 v5] ext4: let ext4_ext_map_blocks return EXT4_MAP_UNWRITTEN flag Zheng Liu
2013-02-08 15:41 ` Jan Kara
2013-02-08 8:44 ` [PATCH 04/10 v5] ext4: track all extent status in extent status tree Zheng Liu
2013-02-11 12:21 ` Jan Kara
2013-02-15 6:45 ` Zheng Liu
2013-02-13 3:28 ` Theodore Ts'o
2013-02-13 3:46 ` [PATCH 1/2] ext4: rename ext4_es_find_extent() to ext4_es_find_delayed_extent() Theodore Ts'o
2013-02-13 3:46 ` [PATCH 2/2] ext4: track all extent status in extent status tree Theodore Ts'o
2013-02-15 6:53 ` [PATCH 04/10 v5] " Zheng Liu
2013-02-17 16:26 ` Zheng Liu
2013-02-08 8:44 ` [PATCH 05/10 v5] ext4: lookup block mapping " Zheng Liu
2013-02-12 12:31 ` Jan Kara
2013-02-15 7:06 ` Zheng Liu
2013-02-15 16:47 ` Jan Kara
2013-02-15 17:25 ` Theodore Ts'o
2013-02-16 2:32 ` Zheng Liu
2013-02-16 16:18 ` Possible TODO projects for the map_blocks() code path (was: Re: [PATCH 05/10 v5] ext4: lookup block mapping in extent status tree) Theodore Ts'o
2013-02-17 3:15 ` Zheng Liu
2013-02-08 8:44 ` [PATCH 06/10 v5] ext4: remove single extent cache Zheng Liu
2013-02-08 8:44 ` [PATCH 07/10 v5] ext4: adjust some functions for reclaiming extents from extent status tree Zheng Liu
2013-02-08 8:44 ` [PATCH 08/10 v5] ext4: reclaim " Zheng Liu
2013-02-08 8:44 ` [PATCH 09/10 v5] ext4: convert unwritten extents from extent status tree in end_io Zheng Liu
2013-02-10 8:45 ` Zheng Liu
2013-02-11 1:52 ` Theodore Ts'o
2013-02-12 12:51 ` Jan Kara
2013-02-15 7:12 ` Zheng Liu
2013-02-08 8:44 ` [PATCH 10/10 v5] ext4: remove bogus wait for unwritten extents in ext4_ind_direct_IO Zheng Liu
2013-02-12 12:58 ` Jan Kara
2013-02-15 7:14 ` Zheng Liu
2013-02-10 1:38 ` [PATCH 00/10 v5] ext4: extent status tree (step2) Theodore Ts'o
2013-02-10 8:40 ` Zheng Liu [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=20130210084007.GA14075@gmail.com \
--to=gnehzuil.liu@gmail.com \
--cc=dmonakhov@openvz.org \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=wenqing.lz@taobao.com \
/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).