Skip to content
Commit 61a57254 authored by Mikulas Patocka's avatar Mikulas Patocka
Browse files

dm-bufio: use kmalloc to allocate power-of-two sized buffers

Vlastimil Babka said [1] that kmalloc will return a power-of-two-aligned
buffer if it was called with a power-of-two size. So, we can use kmalloc
instead of our own slab cache in dm-bufio. Note that the code for the
slab cache was not removed because dm-bufio supports non-power-of-two
buffer sizes.

Link: https://lore.kernel.org/linux-mm/e7fca292-7c79-4f97-a90c-d68178d8ca59@suse.cz/

 [1]

Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
parent e74fa244
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment