All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 1/2] jbd2: don't call get_bh() before calling __jbd2_journal_remove_checkpoint()
Date: Wed, 3 Sep 2014 18:08:37 +0200	[thread overview]
Message-ID: <20140903160837.GC17066@quack.suse.cz> (raw)
In-Reply-To: <1409698000-18126-1-git-send-email-tytso@mit.edu>

On Tue 02-09-14 18:46:39, Ted Tso wrote:
> The __jbd2_journal_remove_checkpoint() doesn't require an elevated
> b_count; indeed, until the jh structure gets released by the call to
> jbd2_journal_put_journal_head(), the bh's b_count is elevated by
> virtue of the existence of the jh structure.
> 
> Suggested-by: Jan Kara <jack@suse.cz>
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
  Looks good so you can add:
Reviewed-by: Jan Kara <jack@suse.cz>

  Just we can do a bit more as I mentioned in my other email:

> @@ -359,8 +354,9 @@ restart2:
>  		 * know that it has been written out and so we can
>  		 * drop it from the list
>  		 */
> -		done = __jbd2_journal_remove_checkpoint(jh);
>  		__brelse(bh);
  Here we don't need to grab bh reference unless we are going to call
wait_on_buffer(). Which moves get_bh / __brelse out of fast path.

> +		if (__jbd2_journal_remove_checkpoint(jh))
> +			break;
>  	}
>  out:
>  	spin_unlock(&journal->j_list_lock);

								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

  parent reply	other threads:[~2014-09-03 16:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02 17:18 [PATCH] jbd2: Optimize jbd2_log_do_checkpoint() a bit Jan Kara
2014-09-02 21:59 ` Theodore Ts'o
2014-09-02 22:46   ` [PATCH 1/2] jbd2: don't call get_bh() before calling __jbd2_journal_remove_checkpoint() Theodore Ts'o
2014-09-02 22:46     ` [PATCH 2/2] jbd2: optimize jbd2_log_do_checkpoint() a bit Theodore Ts'o
2014-09-03  7:54     ` [PATCH 1/2] jbd2: don't call get_bh() before calling __jbd2_journal_remove_checkpoint() Yuanhan Liu
2014-09-03 16:08     ` Jan Kara [this message]
2014-09-03 18:38       ` [PATCH -v2] " Theodore Ts'o
     [not found]     ` <CAGZGoEfjAZuOAbp-AqA-kiL2aTwiRXDO_Di=LPDovRBDNSn5dw@mail.gmail.com>
2014-09-03 17:30       ` [PATCH 1/2] " Theodore Ts'o
2014-09-03 16:03   ` [PATCH] jbd2: Optimize jbd2_log_do_checkpoint() a bit Jan Kara

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=20140903160837.GC17066@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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.