aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/idr.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/include/linux/idr.h b/include/linux/idr.h
index 63aa542da49b..43b87b1c77a3 100644
--- a/include/linux/idr.h
+++ b/include/linux/idr.h
@@ -17,14 +17,13 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/rcupdate.h> 18#include <linux/rcupdate.h>
19 19
20#if BITS_PER_LONG == 32 20/*
21# define IDR_BITS 5 21 * We want shallower trees and thus more bits covered at each layer. 8
22#elif BITS_PER_LONG == 64 22 * bits gives us large enough first layer for most use cases and maximum
23# define IDR_BITS 6 23 * tree depth of 4. Each idr_layer is slightly larger than 2k on 64bit and
24#else 24 * 1k on 32bit.
25# error "BITS_PER_LONG is not 32 or 64" 25 */
26#endif 26#define IDR_BITS 8
27
28#define IDR_SIZE (1 << IDR_BITS) 27#define IDR_SIZE (1 << IDR_BITS)
29#define IDR_MASK ((1 << IDR_BITS)-1) 28#define IDR_MASK ((1 << IDR_BITS)-1)
30 29