Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359384
b: refs/heads/master
c: 050a6b4
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Linus Torvalds committed Feb 28, 2013
1 parent 7e24e06 commit 412ba71
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1d9b2e1e663719d406e3a770979a19ba4233bba0
refs/heads/master: 050a6b47d98e2bcea909c1129111e721668aaa2c
15 changes: 7 additions & 8 deletions trunk/include/linux/idr.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@
#include <linux/init.h>
#include <linux/rcupdate.h>

#if BITS_PER_LONG == 32
# define IDR_BITS 5
#elif BITS_PER_LONG == 64
# define IDR_BITS 6
#else
# error "BITS_PER_LONG is not 32 or 64"
#endif

/*
* We want shallower trees and thus more bits covered at each layer. 8
* bits gives us large enough first layer for most use cases and maximum
* tree depth of 4. Each idr_layer is slightly larger than 2k on 64bit and
* 1k on 32bit.
*/
#define IDR_BITS 8
#define IDR_SIZE (1 << IDR_BITS)
#define IDR_MASK ((1 << IDR_BITS)-1)

Expand Down

0 comments on commit 412ba71

Please sign in to comment.