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
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!
>
>
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 +++
3 matches
Mail list logo