public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Luben Tuikov <luben_tuikov@adaptec.com>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Andrew Morton <akpm@osdl.org>,
	jim.houston@ccur.com, Linux Kernel <linux-kernel@vger.kernel.org>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>,
	Dave Jones <davej@redhat.com>, Jeff Garzik <jgarzik@pobox.com>
Subject: Re: [PATCH 2.6.12.5 1/2] lib: allow idr to be used in irq context
Date: Mon, 22 Aug 2005 12:51:45 -0400	[thread overview]
Message-ID: <430A02A1.9090404@adaptec.com> (raw)
In-Reply-To: <1124720938.5211.13.camel@mulgrave>

On 08/22/05 10:28, James Bottomley wrote:
> On Sun, 2005-08-21 at 20:52 -0700, Andrew Morton wrote:
> 
>>erp.  posix_timers has its own irq-safe lock, so we're doing extra,
>>unneeded locking in that code path.
> 
> 
> Possibly, the posix timer code is rather convoluted in this area so I'm
> not entirely sure my analysis is correct.

Then _please_ drop this thread.

>>I think providing locking inside idr.c was always a mistake - generally we
>>rely on caller-provided locking for such things.
> 
> 
> Well, the reason is because they wanted lockless pre-alloc.  If you do
> it locked, you can't use GFP_KERNEL for the memory allocation flag which
> rather defeats its purpose.

James, please drop this thread and let's concentrate on SCSI.
 
> Perhaps the bug is in the API.  We have pre-allocate, new, find and
> remove.  Perhaps what we're missing is a reuse all of which could then
> rely on caller provided locking, with pre-alloc and remove requiring
> user context but new, find and reuse being happy in irq context.

No, the bug is _not_ in the API.  

*IDR is perfect as it is.*  It gives the caller a lot of freedom, without
internal restrictions (other than the provided by this patch).

Now please let's go back to SCSI and leave other people's code and API
alone.  Shall we James?

SCSI Core needs enough work to have SCSI people worry about other
people's code and design... or is this the modus operandi of the
SCSI Core maintainer...? "Documentation/ManagementStyle", please?

Thank you,
	Luben


  reply	other threads:[~2005-08-22 20:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-16 22:03 [PATCH 2.6.12.5 1/2] lib: allow idr to be used in irq context Luben Tuikov
2005-08-17 16:01 ` Jim Houston
2005-08-21  8:25   ` Andrew Morton
2005-08-21 15:49     ` Luben Tuikov
2005-08-21 16:06       ` James Bottomley
2005-08-21 17:27         ` Luben Tuikov
2005-08-21 22:03           ` James Bottomley
2005-08-22  0:33             ` Luben Tuikov
2005-08-22  3:15               ` James Bottomley
2005-08-22  3:52                 ` Andrew Morton
2005-08-22 14:28                   ` James Bottomley
2005-08-22 16:51                     ` Luben Tuikov [this message]
2005-08-22 21:53                     ` James Bottomley
2005-08-22 22:09                       ` Andrew Morton
2005-08-23 17:15                         ` James Bottomley
2005-08-22 16:33                   ` Luben Tuikov
2005-08-22 14:06         ` Luben Tuikov
  -- strict thread matches above, loose matches on Subject: below --
2005-08-21 20:40 Luben Tuikov

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=430A02A1.9090404@adaptec.com \
    --to=luben_tuikov@adaptec.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=akpm@osdl.org \
    --cc=davej@redhat.com \
    --cc=jgarzik@pobox.com \
    --cc=jim.houston@ccur.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.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