lkml.org 
[lkml]   [2011]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: RFC: Boiler plate functions for ida / idr allocation?
On Thu, Jul 21, 2011 at 05:07:36PM +0930, Rusty Russell wrote:
> From: Rusty Russell <rusty@rustcorp.com.au>
> Subject: ida: Simplified functions for id allocation.
>
> The current hyper-optimized functions are overkill if you simply want
> to allocate an id for a device. Create versions which use an internal
> lock.
>
> Thanks to Tejun for feedback. Feel free to delete the #ifdef TEST
> code.
>
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
...
> static struct kmem_cache *idr_layer_cache;
> +static DEFINE_SPINLOCK(simple_ida);

I think the name is a bit confusing. Maybe simple_ida_lock is better?
Other than that,

Acked-by: Tejun Heo <tj@kernel.org>

I guess this is best routed through -mm?

Thanks.

--
tejun


\
 
 \ /
  Last update: 2011-07-21 10:23    [W:0.058 / U:1.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site