Re: [PATCH 2.6.12.5 1/2] lib: allow idr to be used in irq context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

> 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.

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.

James


-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux