f2fs: optimize __find_rev_next_bit
authorFan Li <fanofcode.li@samsung.com>
Thu, 12 Nov 2015 00:43:04 +0000 (08:43 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 4 Dec 2015 19:52:35 +0000 (11:52 -0800)
commit692223d132067ef2c392adec6f1324d581496212
treebddf5a055f8fe120054be8bd79d81c23bba0292b
parenteb7e813cc791735f2428202d5249a8fd769df1f3
f2fs: optimize __find_rev_next_bit

1. Skip __reverse_ulong if the bitmap is empty.
2. Reduce branches and codes.
According to my test, the performance of this new version is 5% higher on
an empty bitmap of 64bytes, and remains about the same in the worst scenario.

Signed-off-by: Fan li <fanofcode.li@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c