Re: [PATCH] ohci1394: dma_pool_destroy while in_atomic() && irqs_disabled()

From: Jody McIntyre
Date: Sat Feb 19 2005 - 17:57:26 EST


On Sat, Feb 19, 2005 at 11:36:05AM -0800, David Brownell wrote:
>
> Those allocations could be from _using_ a dma pool ... but they're
> not from just creating one!
>
> The cost of creating the dma_pool is the cost of one small kmalloc()
> plus (the expensive part) the /sys/devices/.../pools sysfs attribute
> is created along with the first pool. (Use that instead of slabinfo
> for those pool allocations.) That's why the normal spot to create and
> destroy dma pools is in driver probe() and remove() methods.

OK, then I misread drivers/base/pool.c and my objection to the patch is
unfounded.

> If you want to allocate gobs of other stuff at the same time, that's
> your choice ... but it'd be a separate issue. Cost to create a
> dma_pool is significantly less than PAGE_SIZE, and there's no good
> reason to allocate or destroy those pools anywhere near an IRQ context.

I agree. raw1394 does far too much with irqs disabled, and moving this
stuff to probe() will fix part of that problem.

Jody

>
> - Dave
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/