All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junxiao Bi <junxiao.bi@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH v2] ocfs2: improve recovery performance
Date: Mon, 11 Jul 2016 10:12:39 +0800	[thread overview]
Message-ID: <57830097.8060508@oracle.com> (raw)
In-Reply-To: <20160708142341.5d8c3ab794e89cc981267391@linux-foundation.org>

On 07/09/2016 05:23 AM, Andrew Morton wrote:
> On Thu,  7 Jul 2016 10:24:48 +0800 Junxiao Bi <junxiao.bi@oracle.com> wrote:
> 
>> Journal replay will be run when do recovery for a dead node,
>> to avoid the stale cache impact, all blocks of dead node's
>> journal inode were reload from disk. This hurts the performance,
>> check whether one block is cached before reload it can improve
>> a lot performance. In my test env, the time doing recovery was
>> improved from 120s to 1s.
> 
> So since v1 you did this (unchangelogged bugfix!):
> 
> --- a/fs/ocfs2/journal.c~ocfs2-improve-recovery-performance-v2
> +++ a/fs/ocfs2/journal.c
> @@ -1194,6 +1194,7 @@ static int ocfs2_force_read_journal(stru
>  
>  			brelse(bh);
>  			bh = NULL;
> +			p_blkno++;
>  		}
>  
>  		v_blkno += p_blocks;
> 
> 
> I suppose this is a bit neater?
Yes, looks good. Thank you.

Thanks,
Junxiao.
> 
> --- a/fs/ocfs2/journal.c~ocfs2-improve-recovery-performance-v2-fix
> +++ a/fs/ocfs2/journal.c
> @@ -1172,14 +1172,12 @@ static int ocfs2_force_read_journal(stru
>  			goto bail;
>  		}
>  
> -		for (i = 0; i < p_blocks; i++) {
> +		for (i = 0; i < p_blocks; i++, p_blkno++) {
>  			bh = __find_get_block(osb->sb->s_bdev, p_blkno,
>  					osb->sb->s_blocksize);
>  			/* block not cached. */
> -			if (!bh) {
> -				p_blkno++;
> +			if (!bh)
>  				continue;
> -			}
>  
>  			brelse(bh);
>  			bh = NULL;
> @@ -1194,7 +1192,6 @@ static int ocfs2_force_read_journal(stru
>  
>  			brelse(bh);
>  			bh = NULL;
> -			p_blkno++;
>  		}
>  
>  		v_blkno += p_blocks;
> _
> 

  reply	other threads:[~2016-07-11  2:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-07  2:24 [Ocfs2-devel] [PATCH v2] ocfs2: improve recovery performance Junxiao Bi
2016-07-08 21:23 ` Andrew Morton
2016-07-11  2:12   ` Junxiao Bi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-06-17  9:28 Junxiao Bi
2016-06-17  9:43 ` Joseph Qi
2016-06-20  3:10   ` Gang He
2016-06-21  9:03     ` Junxiao Bi
2016-06-23  1:17   ` Junxiao Bi
2016-06-23 22:13     ` Andrew Morton
2016-06-24  0:46       ` Junxiao Bi
2016-07-07  2:05 ` xuejiufei
2016-07-07  2:16   ` Junxiao Bi

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=57830097.8060508@oracle.com \
    --to=junxiao.bi@oracle.com \
    --cc=ocfs2-devel@oss.oracle.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 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.