linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/5] f2fs: add unlikely macro for compiler optimization
@ 2013-11-28  7:42 Chao Yu
  2013-11-29 10:14 ` [f2fs-dev] " Jaegeuk Kim
  0 siblings, 1 reply; 3+ messages in thread
From: Chao Yu @ 2013-11-28  7:42 UTC (permalink / raw)
  To: ???; +Cc: linux-fsdevel, linux-kernel, linux-f2fs-devel

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
---
 fs/f2fs/node.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 0fe9a97..954155b 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1160,7 +1160,7 @@ int wait_on_node_pages_writeback(struct f2fs_sb_info *sbi, nid_t ino)
 			struct page *page = pvec.pages[i];
 
 			/* until radix tree lookup accepts end_index */
-			if (page->index > end)
+			if (unlikely(page->index > end))
 				continue;
 
 			if (ino && ino_of_node(page) == ino) {
-- 
1.7.9.5


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [f2fs-dev] [PATCH 2/5] f2fs: add unlikely macro for compiler optimization
  2013-11-28  7:42 [PATCH 2/5] f2fs: add unlikely macro for compiler optimization Chao Yu
@ 2013-11-29 10:14 ` Jaegeuk Kim
  2013-12-02  4:32   ` Chao Yu
  0 siblings, 1 reply; 3+ messages in thread
From: Jaegeuk Kim @ 2013-11-29 10:14 UTC (permalink / raw)
  To: Chao Yu; +Cc: linux-fsdevel, linux-kernel, linux-f2fs-devel, 谭姝

Hi,

Could you make a patch to add *unlikely* as many as possible across the
whole source files at once?
It is wasteful to add it with a bunch of patches at multiple times.

And please write descriptions for all the patches even if nothing is
special.
In this case, why should we set *unlikely* for checking this condition?

Thanks,

2013-11-28 (목), 15:42 +0800, Chao Yu:
> Signed-off-by: Chao Yu <chao2.yu@samsung.com>
> ---
>  fs/f2fs/node.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
> index 0fe9a97..954155b 100644
> --- a/fs/f2fs/node.c
> +++ b/fs/f2fs/node.c
> @@ -1160,7 +1160,7 @@ int wait_on_node_pages_writeback(struct f2fs_sb_info *sbi, nid_t ino)
>  			struct page *page = pvec.pages[i];
>  
>  			/* until radix tree lookup accepts end_index */
> -			if (page->index > end)
> +			if (unlikely(page->index > end))
>  				continue;
>  
>  			if (ino && ino_of_node(page) == ino) {

-- 
Jaegeuk Kim
Samsung

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/5] f2fs: add unlikely macro for compiler optimization
  2013-11-29 10:14 ` [f2fs-dev] " Jaegeuk Kim
@ 2013-12-02  4:32   ` Chao Yu
  0 siblings, 0 replies; 3+ messages in thread
From: Chao Yu @ 2013-12-02  4:32 UTC (permalink / raw)
  To: jaegeuk.kim; +Cc: linux-fsdevel, linux-kernel, linux-f2fs-devel

Hi Kim,

> -----Original Message-----
> From: Jaegeuk Kim [mailto:jaegeuk.kim@samsung.com]
> Sent: Friday, November 29, 2013 6:14 PM
> To: Chao Yu
> Cc: linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org; linux-f2fs-devel@lists.sourceforge.net; 谭姝
> Subject: Re: [f2fs-dev] [PATCH 2/5] f2fs: add unlikely macro for compiler optimization
> 
> Hi,
> 
> Could you make a patch to add *unlikely* as many as possible across the
> whole source files at once?
> It is wasteful to add it with a bunch of patches at multiple times.

Alright, I will work on this.

> 
> And please write descriptions for all the patches even if nothing is
> special.
> In this case, why should we set *unlikely* for checking this condition?

Got it.

Regards,
Yu

> 
> Thanks,
> 
> 2013-11-28 (목), 15:42 +0800, Chao Yu:
> > Signed-off-by: Chao Yu <chao2.yu@samsung.com>
> > ---
> >  fs/f2fs/node.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
> > index 0fe9a97..954155b 100644
> > --- a/fs/f2fs/node.c
> > +++ b/fs/f2fs/node.c
> > @@ -1160,7 +1160,7 @@ int wait_on_node_pages_writeback(struct f2fs_sb_info *sbi, nid_t ino)
> >  			struct page *page = pvec.pages[i];
> >
> >  			/* until radix tree lookup accepts end_index */
> > -			if (page->index > end)
> > +			if (unlikely(page->index > end))
> >  				continue;
> >
> >  			if (ino && ino_of_node(page) == ino) {
> 
> --
> Jaegeuk Kim
> Samsung


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-12-02  4:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-28  7:42 [PATCH 2/5] f2fs: add unlikely macro for compiler optimization Chao Yu
2013-11-29 10:14 ` [f2fs-dev] " Jaegeuk Kim
2013-12-02  4:32   ` Chao Yu

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).