RE: [f2fs-dev] [PATCH 2/5] f2fs: add unlikely macro for compiler optimization

2013-12-01 Thread Chao Yu
Hi Kim,

> -Original Message-
> From: Jaegeuk Kim [mailto:jaegeuk@samsung.com]
> Sent: Friday, November 29, 2013 6:14 PM
> To: Chao Yu
> Cc: linux-fsde...@vger.kernel.org; linux-kernel@vger.kernel.org; 
> linux-f2fs-de...@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 
> > ---
> >  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-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [f2fs-dev] [PATCH 2/5] f2fs: add unlikely macro for compiler optimization

2013-11-29 Thread Jaegeuk Kim
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 
> ---
>  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-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/