ida: Move ida_bitmap to a percpu variable
authorMatthew Wilcox <mawilcox@microsoft.com>
Fri, 16 Dec 2016 16:55:56 +0000 (11:55 -0500)
committerMatthew Wilcox <mawilcox@microsoft.com>
Tue, 14 Feb 2017 02:44:01 +0000 (21:44 -0500)
commit7ad3d4d85c7af9632055a6ac0aa15b6b6a321c6b
tree1586a6c01ced64d24c67859d792140853b148d20
parent0a835c4f090af2c76fc2932c539c3b32fd21fbbb
ida: Move ida_bitmap to a percpu variable

When we preload the IDA, we allocate an IDA bitmap.  Instead of storing
that preallocated bitmap in the IDA, we store it in a percpu variable.
Generally there are more IDAs in the system than CPUs, so this cuts down
on the number of preallocated bitmaps that are unused, and about half
of the IDA users did not call ida_destroy() so they were leaking IDA
bitmaps.

Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
include/linux/idr.h
lib/idr.c
lib/radix-tree.c
tools/testing/radix-tree/linux/kernel.h
tools/testing/radix-tree/linux/percpu.h