mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
bitmap: optimise bitmap_set and bitmap_clear of a single bit
We have eight users calling bitmap_clear for a single bit and seventeen calling bitmap_set for a single bit. Rather than fix all of them to call __clear_bit or __set_bit, turn bitmap_clear and bitmap_set into inline functions and make this special case efficient. Link: http://lkml.kernel.org/r/20170628153221.11322-3-willy@infradead.org Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com> Acked-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Matthew Wilcox <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
3cc78125a0
commit
e5af323c9b
3 changed files with 24 additions and 10 deletions
|
@ -333,9 +333,6 @@ static void __init test_bitmap_u32_array_conversions(void)
|
|||
}
|
||||
}
|
||||
|
||||
#define __bitmap_set(a, b, c) bitmap_set(a, b, c)
|
||||
#define __bitmap_clear(a, b, c) bitmap_clear(a, b, c)
|
||||
|
||||
static void noinline __init test_mem_optimisations(void)
|
||||
{
|
||||
DECLARE_BITMAP(bmap1, 1024);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue