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

2013-12-06 Thread Chao Yu
> -Original Message- > From: Jaegeuk Kim [mailto:jaegeuk@samsung.com] > Sent: Friday, December 06, 2013 2:15 PM > Cc: Jaegeuk Kim; linux-fsde...@vger.kernel.org; linux-ker...@vger.kernel.org; > linux-f2fs-devel@lists.sourceforge.net; Chao Yu > Subject: [PATCH] f2fs: add unlikely() macr

[f2fs-dev] [PATCH 3/3 V2] f2fs: introduce f2fs_cache_node_page() to add page into node_inode cache

2013-12-06 Thread Chao Yu
This patch introduces f2fs_cache_node_page(), in this function, page which is readed ahead will be copy to node_inode's mapping cache. It will avoid rereading these node pages. change log: o check validity of grabbed page suggested by Jaegeuk Kim. Suggested-by: Jaegeuk Kim Signed-off-by: Chao Y

Re: [f2fs-dev] [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