All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Yu <chao2.yu@samsung.com>
To: 'Jaegeuk Kim' <jaegeuk@kernel.org>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH 08/11] f2fs: fix wrong condition for unlikely
Date: Wed, 30 Jul 2014 20:58:37 +0800	[thread overview]
Message-ID: <00f401cfabf6$14f52b70$3edf8250$@samsung.com> (raw)
In-Reply-To: <20140730031820.GC99885@jaegeuk-mac02>

Hi,

> -----Original Message-----
> From: Jaegeuk Kim [mailto:jaegeuk@kernel.org]
> Sent: Wednesday, July 30, 2014 11:18 AM
> To: Chao Yu
> Cc: linux-kernel@vger.kernel.org; linux-fsdevel@vger.kernel.org;
> linux-f2fs-devel@lists.sourceforge.net
> Subject: Re: [f2fs-dev] [PATCH 08/11] f2fs: fix wrong condition for unlikely
> 
> On Wed, Jul 30, 2014 at 09:44:43AM +0800, Chao Yu wrote:
> > Hi Jaegeuk,
> >
> > > -----Original Message-----
> > > From: Jaegeuk Kim [mailto:jaegeuk@kernel.org]
> > > Sent: Saturday, July 26, 2014 6:47 AM
> > > To: linux-kernel@vger.kernel.org; linux-fsdevel@vger.kernel.org;
> > > linux-f2fs-devel@lists.sourceforge.net
> > > Cc: Jaegeuk Kim
> > > Subject: [f2fs-dev] [PATCH 08/11] f2fs: fix wrong condition for unlikely
> > >
> > > This patch fixes the wrongly used unlikely condition.
> > >
> > > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Reviewed-by: Chao Yu <chao2.yu@samsung.com>

> > > ---
> > >  fs/f2fs/checkpoint.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
> > > index 42a16c1..36b0d47 100644
> > > --- a/fs/f2fs/checkpoint.c
> > > +++ b/fs/f2fs/checkpoint.c
> > > @@ -932,7 +932,7 @@ static void do_checkpoint(struct f2fs_sb_info *sbi, bool is_umount)
> > >  	/* Here, we only have one bio having CP pack */
> > >  	sync_meta_pages(sbi, META_FLUSH, LONG_MAX);
> > >
> > > -	if (unlikely(!is_set_ckpt_flags(ckpt, CP_ERROR_FLAG))) {
> > > +	if (!is_set_ckpt_flags(ckpt, CP_ERROR_FLAG)) {
> >
> > Maybe use likely(!is_set_ckpt_flags(ckpt, CP_ERROR_FLAG)) or
> >
> > if (unlikely(is_set_ckpt_flags(ckpt, CP_ERROR_FLAG)))
> > 	return;
> >
> > is more appropriate. How do you think?
> 
> Currently I'd like to put this without any likely or unlikely.
> Best thing is to measure some performance how this would make effect on.

I think we could get little improvement of performance if we use likely or unlikely
here. So if you'd like leave it without pre-judgment, it will be ok.
Let's just leave it as it was. :)

Thanks,

> Until then, it'd be better to do without it, since apparently this should
> not be unlikely.
> 
> How about you?
> Can we compare both of them explicitly?
> 
> Thanks,
> 
> >
> > >  		clear_prefree_segments(sbi);
> > >  		release_dirty_inode(sbi);
> > >  		F2FS_RESET_SB_DIRT(sbi);
> > > --
> > > 1.8.5.2 (Apple Git-48)
> > >
> > >
> > > ------------------------------------------------------------------------------
> > > Want fast and easy access to all the code in your enterprise? Index and
> > > search up to 200,000 lines of code with a free copy of Black Duck
> > > Code Sight - the same software that powers the world's largest code
> > > search on Ohloh, the Black Duck Open Hub! Try it now.
> > > http://p.sf.net/sfu/bds
> > > _______________________________________________
> > > Linux-f2fs-devel mailing list
> > > Linux-f2fs-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk

WARNING: multiple messages have this Message-ID (diff)
From: Chao Yu <chao2.yu@samsung.com>
To: "'Jaegeuk Kim'" <jaegeuk@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: RE: [f2fs-dev] [PATCH 08/11] f2fs: fix wrong condition for unlikely
Date: Wed, 30 Jul 2014 20:58:37 +0800	[thread overview]
Message-ID: <00f401cfabf6$14f52b70$3edf8250$@samsung.com> (raw)
In-Reply-To: <20140730031820.GC99885@jaegeuk-mac02>

Hi,

> -----Original Message-----
> From: Jaegeuk Kim [mailto:jaegeuk@kernel.org]
> Sent: Wednesday, July 30, 2014 11:18 AM
> To: Chao Yu
> Cc: linux-kernel@vger.kernel.org; linux-fsdevel@vger.kernel.org;
> linux-f2fs-devel@lists.sourceforge.net
> Subject: Re: [f2fs-dev] [PATCH 08/11] f2fs: fix wrong condition for unlikely
> 
> On Wed, Jul 30, 2014 at 09:44:43AM +0800, Chao Yu wrote:
> > Hi Jaegeuk,
> >
> > > -----Original Message-----
> > > From: Jaegeuk Kim [mailto:jaegeuk@kernel.org]
> > > Sent: Saturday, July 26, 2014 6:47 AM
> > > To: linux-kernel@vger.kernel.org; linux-fsdevel@vger.kernel.org;
> > > linux-f2fs-devel@lists.sourceforge.net
> > > Cc: Jaegeuk Kim
> > > Subject: [f2fs-dev] [PATCH 08/11] f2fs: fix wrong condition for unlikely
> > >
> > > This patch fixes the wrongly used unlikely condition.
> > >
> > > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Reviewed-by: Chao Yu <chao2.yu@samsung.com>

> > > ---
> > >  fs/f2fs/checkpoint.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
> > > index 42a16c1..36b0d47 100644
> > > --- a/fs/f2fs/checkpoint.c
> > > +++ b/fs/f2fs/checkpoint.c
> > > @@ -932,7 +932,7 @@ static void do_checkpoint(struct f2fs_sb_info *sbi, bool is_umount)
> > >  	/* Here, we only have one bio having CP pack */
> > >  	sync_meta_pages(sbi, META_FLUSH, LONG_MAX);
> > >
> > > -	if (unlikely(!is_set_ckpt_flags(ckpt, CP_ERROR_FLAG))) {
> > > +	if (!is_set_ckpt_flags(ckpt, CP_ERROR_FLAG)) {
> >
> > Maybe use likely(!is_set_ckpt_flags(ckpt, CP_ERROR_FLAG)) or
> >
> > if (unlikely(is_set_ckpt_flags(ckpt, CP_ERROR_FLAG)))
> > 	return;
> >
> > is more appropriate. How do you think?
> 
> Currently I'd like to put this without any likely or unlikely.
> Best thing is to measure some performance how this would make effect on.

I think we could get little improvement of performance if we use likely or unlikely
here. So if you'd like leave it without pre-judgment, it will be ok.
Let's just leave it as it was. :)

Thanks,

> Until then, it'd be better to do without it, since apparently this should
> not be unlikely.
> 
> How about you?
> Can we compare both of them explicitly?
> 
> Thanks,
> 
> >
> > >  		clear_prefree_segments(sbi);
> > >  		release_dirty_inode(sbi);
> > >  		F2FS_RESET_SB_DIRT(sbi);
> > > --
> > > 1.8.5.2 (Apple Git-48)
> > >
> > >
> > > ------------------------------------------------------------------------------
> > > Want fast and easy access to all the code in your enterprise? Index and
> > > search up to 200,000 lines of code with a free copy of Black Duck
> > > Code Sight - the same software that powers the world's largest code
> > > search on Ohloh, the Black Duck Open Hub! Try it now.
> > > http://p.sf.net/sfu/bds
> > > _______________________________________________
> > > Linux-f2fs-devel mailing list
> > > Linux-f2fs-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


  reply	other threads:[~2014-07-30 12:59 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-25 22:47 [PATCH 01/11] f2fs: add nobarrier mount option Jaegeuk Kim
2014-07-25 22:47 ` Jaegeuk Kim
2014-07-25 22:47 ` [PATCH 02/11] f2fs: punch the core function for inode management Jaegeuk Kim
2014-07-25 22:47   ` Jaegeuk Kim
2014-07-29 11:29   ` Chao Yu
2014-07-29 11:29     ` [f2fs-dev] " Chao Yu
2014-07-25 22:47 ` [PATCH 03/11] f2fs: add infra for ino management Jaegeuk Kim
2014-07-25 22:47   ` Jaegeuk Kim
2014-07-29 11:30   ` Chao Yu
2014-07-29 11:30     ` [f2fs-dev] " Chao Yu
2014-07-25 22:47 ` [PATCH 04/11] f2fs: use radix_tree " Jaegeuk Kim
2014-07-29 11:32   ` Chao Yu
2014-07-29 11:32     ` [f2fs-dev] " Chao Yu
2014-07-29 12:34     ` Jaegeuk Kim
2014-07-29 12:34       ` [f2fs-dev] " Jaegeuk Kim
2014-07-25 22:47 ` [PATCH 05/11] f2fs: add info of appended or updated data writes Jaegeuk Kim
2014-07-25 22:47   ` Jaegeuk Kim
2014-07-29 11:38   ` Chao Yu
2014-07-29 11:38     ` [f2fs-dev] " Chao Yu
2014-07-25 22:47 ` [PATCH 06/11] f2fs: skip unnecessary data writes during fsync Jaegeuk Kim
2014-07-25 22:47   ` Jaegeuk Kim
2014-07-29 11:39   ` Chao Yu
2014-07-29 11:39     ` [f2fs-dev] " Chao Yu
2014-07-29 12:43     ` Jaegeuk Kim
2014-07-29 12:43       ` [f2fs-dev] " Jaegeuk Kim
2014-07-30 11:58       ` Chao Yu
2014-07-30 11:58         ` [f2fs-dev] " Chao Yu
2014-07-25 22:47 ` [PATCH 07/11] f2fs: enable in-place-update for fdatasync Jaegeuk Kim
2014-07-25 22:47   ` Jaegeuk Kim
2014-07-29  0:41   ` Changman Lee
2014-07-29  0:41     ` [f2fs-dev] " Changman Lee
2014-07-29 12:22     ` Jaegeuk Kim
2014-07-29 23:54       ` Changman Lee
2014-07-29 23:54         ` [f2fs-dev] " Changman Lee
2014-07-30  1:08         ` Jaegeuk Kim
2014-07-30  1:08           ` [f2fs-dev] " Jaegeuk Kim
2014-07-30  1:56           ` Changman Lee
2014-07-30  3:11             ` Jaegeuk Kim
2014-07-30  3:11               ` [f2fs-dev] " Jaegeuk Kim
2014-07-30  2:45           ` Chao Yu
2014-07-30  3:13             ` Jaegeuk Kim
2014-07-30  3:13               ` [f2fs-dev] " Jaegeuk Kim
2014-07-30 12:48               ` Chao Yu
2014-07-25 22:47 ` [PATCH 08/11] f2fs: fix wrong condition for unlikely Jaegeuk Kim
2014-07-25 22:47   ` Jaegeuk Kim
2014-07-30  1:44   ` Chao Yu
2014-07-30  1:44     ` [f2fs-dev] " Chao Yu
2014-07-30  3:18     ` Jaegeuk Kim
2014-07-30  3:18       ` [f2fs-dev] " Jaegeuk Kim
2014-07-30 12:58       ` Chao Yu [this message]
2014-07-30 12:58         ` Chao Yu
2014-07-25 22:47 ` [PATCH 09/11] f2fs: test before set/clear bits Jaegeuk Kim
2014-07-25 22:47   ` Jaegeuk Kim
2014-07-25 22:47 ` [PATCH 10/11] f2fs: avoid checkpoint when error was occurred Jaegeuk Kim
2014-07-25 22:47   ` Jaegeuk Kim
2014-07-29 11:41   ` Chao Yu
2014-07-29 11:41     ` [f2fs-dev] " Chao Yu
2014-07-29 13:00     ` Jaegeuk Kim
2014-07-29 13:00       ` [f2fs-dev] " Jaegeuk Kim
2014-07-25 22:47 ` [PATCH 11/11] f2fs: avoid retrying wrong recovery routine " Jaegeuk Kim
2014-07-25 22:47   ` Jaegeuk Kim
2014-07-29 13:01   ` [PATCH v2 " Jaegeuk Kim
2014-07-29 11:28 ` [PATCH 01/11] f2fs: add nobarrier mount option Chao Yu
2014-07-29 11:28   ` [f2fs-dev] " Chao Yu
2014-07-29 12:22   ` Jaegeuk Kim
2014-07-29 12:22     ` [f2fs-dev] " Jaegeuk Kim

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='00f401cfabf6$14f52b70$3edf8250$@samsung.com' \
    --to=chao2.yu@samsung.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@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.