xfs
[Top] [All Lists]

Re: [PATCH v2] xfs: introduce object readahead to log recovery

To: Ben Myers <bpm@xxxxxxx>
Subject: Re: [PATCH v2] xfs: introduce object readahead to log recovery
From: Zhi Yong Wu <zwu.kernel@xxxxxxxxx>
Date: Wed, 31 Jul 2013 22:17:15 +0800
Cc: Dave Chinner <david@xxxxxxxxxxxxx>, "linux-fsdevel@xxxxxxxxxxxxxxx" <linux-fsdevel@xxxxxxxxxxxxxxx>, Zhi Yong Wu <wuzhy@xxxxxxxxxxxxxxxxxx>, linux-kernel mlist <linux-kernel@xxxxxxxxxxxxxxx>, xfstests <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=PzVGd+vsopSm76yGOla+Uvdjek4De4pwhitpEWNHrDU=; b=N72X2NSPRZU1i1rfXDf9duQ6XvYBNq8qwQJX5gTkOPsjAuOl9kN2xN521BPYLUhnfg WFSVSawiY1UQ5LpM6f9JINpbBvGTABxiSDrXV8v36v6rqz8XJhqNQxgl5Z8t/9aQsFB2 88fpsM4wIVAMLHpj2qMDmJDzMopCXvqw4UxDmUiuIr9sjLzBXMsC0QYSdpdpwijIbEoi pfQ05va+Np8DP4w9PIlShz4YgO42W3fS+7/tTlXUuNwc775/xbtk04V1Ycfvwyq9NzAl YztEUV2YxRZie/rA6/c3rWLoJu9vWYnlXPD+eaG6LZtP04hF98jbN5PJZIiXQds0Z3E6 oxDw==
In-reply-to: <20130731133506.GT3111@xxxxxxx>
References: <1375178347-29037-1-git-send-email-zwu.kernel@xxxxxxxxx> <20130730231155.GM13468@dastard> <CAEH94LjXRG755cTsuGN_R0V+J9aRvEJaS+0aQSAOkNWL1UbXTA@xxxxxxxxxxxxxx> <20130731133506.GT3111@xxxxxxx>
On Wed, Jul 31, 2013 at 9:35 PM, Ben Myers <bpm@xxxxxxx> wrote:
> Hey Zhi,
>
> On Wed, Jul 31, 2013 at 12:07:32PM +0800, Zhi Yong Wu wrote:
>> On Wed, Jul 31, 2013 at 7:11 AM, Dave Chinner <david@xxxxxxxxxxxxx> wrote:
>> > On Tue, Jul 30, 2013 at 05:59:07PM +0800, zwu.kernel@xxxxxxxxx wrote:
>> >> From: Zhi Yong Wu <wuzhy@xxxxxxxxxxxxxxxxxx>
>> >>
>> >>   It can take a long time to run log recovery operation because it is
>> >> single threaded and is bound by read latency. We can find that it took
>> >> most of the time to wait for the read IO to occur, so if one object
>> >> readahead is introduced to log recovery, it will obviously reduce the
>> >> log recovery time.
>> >>
>> >> Log recovery time stat:
>> >>
>> >>           w/o this patch        w/ this patch
>> >>
>> >> real:        0m15.023s             0m7.802s
>> >> user:        0m0.001s              0m0.001s
>> >> sys:         0m0.246s              0m0.107s
>> >>
>> >> Signed-off-by: Zhi Yong Wu <wuzhy@xxxxxxxxxxxxxxxxxx>
>> >> ---
>> >>  fs/xfs/xfs_log_recover.c | 162 
>> >> +++++++++++++++++++++++++++++++++++++++++++++--
>> >>  fs/xfs/xfs_log_recover.h |   2 +
>> >>  2 files changed, 159 insertions(+), 5 deletions(-)
>> >>
>> >> diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
>> >> index 7681b19..029826f 100644
>> >> --- a/fs/xfs/xfs_log_recover.c
>> >> +++ b/fs/xfs/xfs_log_recover.c
>> >> @@ -3116,6 +3116,111 @@ xlog_recover_free_trans(
>> >>       kmem_free(trans);
>> >>  }
>> >>
>> >> +STATIC void
>> >> +xlog_recover_buffer_ra_pass2(
>> >> +     struct xlog                     *log,
>> >> +     struct xlog_recover_item        *item)
>> >> +{
>> >> +     xfs_buf_log_format_t    *buf_f = item->ri_buf[0].i_addr;
>> >> +     xfs_mount_t             *mp = log->l_mp;
>> >
>> >         struct xfs_buf_log_format
>> >         struct xfs_mount
>> Why? *_t is also used in a lot of other places.
>
> It is just a general style preference for using the struct instead of the _t 
> in
> the xfs codebase.  Over the course of the past few years they've slowly been
> converted in this direction, and we prefer not to add any more _t if it can be
> avoided.
Got it, thanks. I have sent out v3 with this style change.

>
> -Ben



-- 
Regards,

Zhi Yong Wu

<Prev in Thread] Current Thread [Next in Thread>