The patch titled Subject: find_bit-micro-optimise-find_next__bit-v2 has been added to the -mm tree. Its filename is find_bit-micro-optimise-find_next__bit-v2.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/find_bit-micro-optimise-find_next__bit-v2.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/find_bit-micro-optimise-find_next__bit-v2.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Matthew Wilcox <mawilcox@xxxxxxxxxxxxx> Subject: find_bit-micro-optimise-find_next__bit-v2 Link: http://lkml.kernel.org/r/1483709016-1834-1-git-send-email-mawilcox@xxxxxxxxxxxxxxxxx Signed-off-by: Matthew Wilcox <mawilcox@xxxxxxxxxxxxx> Acked-by: Yury Norov <ynorov@xxxxxxxxxxxxxxxxxx> Acked-by: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/find_bit.c | 2 +- tools/lib/find_bit.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff -puN lib/find_bit.c~find_bit-micro-optimise-find_next__bit-v2 lib/find_bit.c --- a/lib/find_bit.c~find_bit-micro-optimise-find_next__bit-v2 +++ a/lib/find_bit.c @@ -151,7 +151,7 @@ static unsigned long _find_next_bit_le(c { unsigned long tmp; - if (!nbits || start >= nbits) + if (unlikely(start >= nbits)) return nbits; tmp = addr[start / BITS_PER_LONG] ^ invert; diff -puN tools/lib/find_bit.c~find_bit-micro-optimise-find_next__bit-v2 tools/lib/find_bit.c --- a/tools/lib/find_bit.c~find_bit-micro-optimise-find_next__bit-v2 +++ a/tools/lib/find_bit.c @@ -34,7 +34,7 @@ static unsigned long _find_next_bit(cons { unsigned long tmp; - if (!nbits || start >= nbits) + if (unlikely(start >= nbits)) return nbits; tmp = addr[start / BITS_PER_LONG] ^ invert; _ Patches currently in -mm which might be from mawilcox@xxxxxxxxxxxxx are find_bit-micro-optimise-find_next__bit.patch find_bit-micro-optimise-find_next__bit-v2.patch reimplement-idr-and-ida-using-the-radix-tree-support-storing-null-in-the-idr.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html