From: Jonathan Cameron <jic23@cam.ac.uk>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tejun Heo <tj@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: RFC: Boiler plate functions for ida / idr allocation?
Date: Fri, 22 Jul 2011 17:43:34 +0100 [thread overview]
Message-ID: <4E29A8B6.3060002@cam.ac.uk> (raw)
In-Reply-To: <87sjpyzhz2.fsf@rustcorp.com.au>
On 07/22/11 12:13, Rusty Russell wrote:
> On Thu, 21 Jul 2011 10:35:01 +0200, Tejun Heo <tj@kernel.org> wrote:
>> On Thu, Jul 21, 2011 at 10:19:46AM +0200, Tejun Heo wrote:
>>> 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,
>>
>> Ooh, one more thing, maybe it would be better to use spin_lock_irq()
>> to allow calling free under other irq locks.
>
> Jonathan, please take original patch and mod it to taste, and produce a
> series on it you can push to Andrew.
>
> As for irqsave etc, as soon as someone needs that we can add
> it... Jonathan will run into it soon enough.
>
> Thanks,
> Rusty.
>
Given the timing, it's clearly 3.2 merge window material anyway. Too late to
push any users this time round even if we hustled it through.
Quite a few 'interesting' users out there now I look into them. Might take
a little while to get them past the relevant maintainers.
I've just sent out a few of the simpler cases. I guess Andrew may take the core
patch and the others will route through relevant subsystems.
A few more to do. Some of them need a little more thought.
Jonathan
prev parent reply other threads:[~2011-07-22 16:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-13 9:44 RFC: Boiler plate functions for ida / idr allocation? Jonathan Cameron
2011-07-13 12:41 ` Stefan Richter
2011-07-15 18:12 ` Boaz Harrosh
2011-07-15 21:35 ` Stefan Richter
2011-07-13 13:14 ` Stefan Richter
2011-07-13 13:17 ` Jonathan Cameron
2011-07-13 13:31 ` Tejun Heo
2011-07-13 13:48 ` Jonathan Cameron
2011-07-21 6:50 ` Rusty Russell
2011-07-21 7:37 ` Rusty Russell
2011-07-21 8:19 ` Tejun Heo
2011-07-21 8:29 ` Jonathan Cameron
2011-07-21 8:35 ` Tejun Heo
2011-07-22 11:13 ` Rusty Russell
2011-07-22 16:43 ` Jonathan Cameron [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E29A8B6.3060002@cam.ac.uk \
--to=jic23@cam.ac.uk \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox