Tejun Heo 72dba584b6 ida: implement idr based id allocator
Implement idr based id allocator.  ida is used the same way idr is
used but lacks id -> ptr translation and thus consumes much less
memory.  struct ida_bitmap is attached as leaf nodes to idr tree which
is managed by the idr code.  Each ida_bitmap is 128bytes long and
contains slightly less than a thousand slots.

ida is more aggressive with releasing extra resources acquired using
ida_pre_get().  After every successful id allocation, ida frees one
reserved idr_layer if possible.  Reserved ida_bitmap is not freed
automatically but only one ida_bitmap is reserved and it's almost
always used right away.  Under most circumstances, ida won't hold on
to memory for too long which isn't actively used.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-11 16:09:03 -07:00
..
2007-07-10 17:51:13 -07:00
2005-10-18 08:26:15 -07:00
2007-05-11 05:38:25 -04:00
2006-12-08 08:28:39 -08:00
2006-06-25 10:01:20 -07:00
2005-04-16 15:20:36 -07:00
2006-06-25 10:01:20 -07:00
2007-05-10 18:24:13 +02:00
2005-04-16 15:20:36 -07:00
2007-04-25 22:28:53 -07:00
2005-04-16 15:20:36 -07:00
2007-05-08 11:14:58 -07:00
2005-04-16 15:20:36 -07:00
2007-02-20 17:10:15 -08:00
2005-04-16 15:20:36 -07:00
2007-06-08 17:23:34 -07:00
2007-07-11 16:09:03 -07:00
2006-06-20 20:24:58 -07:00
2007-05-21 09:18:19 -07:00
2006-10-06 08:53:40 -07:00
2007-07-10 17:51:13 -07:00
2007-07-11 16:09:01 -07:00
2006-06-25 10:01:09 -07:00
2007-07-10 17:51:13 -07:00
2005-04-16 15:20:36 -07:00
2006-12-04 02:00:22 -05:00
2007-02-17 19:07:33 +01:00