<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/lib/find_bit.c, branch v4.14.149</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.149</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.149'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2017-02-25T01:46:57+00:00</updated>
<entry>
<title>lib/find_bit.c: micro-optimise find_next_*_bit</title>
<updated>2017-02-25T01:46:57+00:00</updated>
<author>
<name>Matthew Wilcox</name>
<email>mawilcox@microsoft.com</email>
</author>
<published>2017-02-24T23:00:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e4afd2e5567fc5d59988025f7528f9b4794d86a5'/>
<id>urn:sha1:e4afd2e5567fc5d59988025f7528f9b4794d86a5</id>
<content type='text'>
This saves 32 bytes on my x86-64 build, mostly due to alignment
considerations and sharing more code between find_next_bit and
find_next_zero_bit, but it does save a couple of instructions.

There's really two parts to this commit:
 - First, the first half of the test: (!nbits || start &gt;= nbits) is
   trivially a subset of the second half, since nbits and start are both
   unsigned
 - Second, while looking at the disassembly, I noticed that GCC was
   predicting the branch taken. Since this is a failure case, it's
   clearly the less likely of the two branches, so add an unlikely() to
   override GCC's heuristics.

[mawilcox@microsoft.com: v2]
  Link: http://lkml.kernel.org/r/1483709016-1834-1-git-send-email-mawilcox@linuxonhyperv.com
Link: http://lkml.kernel.org/r/1483709016-1834-1-git-send-email-mawilcox@linuxonhyperv.com
Signed-off-by: Matthew Wilcox &lt;mawilcox@microsoft.com&gt;
Acked-by: Yury Norov &lt;ynorov@caviumnetworks.com&gt;
Acked-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>lib: rename lib/find_next_bit.c to lib/find_bit.c</title>
<updated>2015-04-17T13:03:54+00:00</updated>
<author>
<name>Yury Norov</name>
<email>yury.norov@gmail.com</email>
</author>
<published>2015-04-16T19:43:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=840620a1596a90636a44d6a593db4041bb28d52e'/>
<id>urn:sha1:840620a1596a90636a44d6a593db4041bb28d52e</id>
<content type='text'>
This file contains implementation for all find_*_bit{,_le}
So giving it more generic name looks reasonable.

Signed-off-by: Yury Norov &lt;yury.norov@gmail.com&gt;
Reviewed-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Reviewed-by: George Spelvin &lt;linux@horizon.com&gt;
Cc: Alexey Klimov &lt;klimov.linux@gmail.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Cc: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Cc: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;
Cc: Mark Salter &lt;msalter@redhat.com&gt;
Cc: AKASHI Takahiro &lt;takahiro.akashi@linaro.org&gt;
Cc: Thomas Graf &lt;tgraf@suug.ch&gt;
Cc: Valentin Rothberg &lt;valentinrothberg@gmail.com&gt;
Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
