Re: [PATCH] f2fs: add unlikely() macro for compiler more aggressively

2013-12-06 Thread Andi Kleen
Jaegeuk Kim writes: > struct page *page; > repeat: > page = grab_cache_page(mapping, index); > - if (!page) { > + if (unlikely(!page)) { This is completely pointless, gcc already considers any test for NULL unlikely. In general i would advise against splattering unlikely all

RE: [PATCH] f2fs: add unlikely() macro for compiler more aggressively

2013-12-06 Thread Chao Yu
f2fs: add unlikely() macro for compiler more aggressively > > This patch adds unlikely() macro into the most of codes. > The basic rule is to add that when: > - checking unusual errors, > - checking page mappings, > - and the other unlikely conditions. Looks nice to me! > >

[PATCH] f2fs: add unlikely() macro for compiler more aggressively

2013-12-05 Thread Jaegeuk Kim
This patch adds unlikely() macro into the most of codes. The basic rule is to add that when: - checking unusual errors, - checking page mappings, - and the other unlikely conditions. Cc: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 22 ++ fs/f2fs/data.c | 63 +++