Re: vmalloc() in interrupt context

©[@ÄØÿ¿8þÿ¿Jeff Garzik (kernel@kvack.org)
Tue, 27 Jun 2000 13:32:37 -0400 (EDT)


On Tue, 27 Jun 2000, Jeff Garzik wrote:

> Use __vmalloc, that lets you provide a priority. Requires 2.4.x though,
> doesn't exist in 2.2.x.

vmalloc of any form from an interrupt handler is doomed to failure --
Don't Do It. Consider the fact that you have to send a tlb flush IPI on
SMP boxes; what happens when one of the other CPUs is spinning on a lock
with interrupts disabled waiting for the caller of vmalloc to release a
lock (ie the interrupt entry lock -- likely).

Let me repeat: Never ever use vmalloc from interrupts, while holding
spinlocks, in hopes of decent performance, and/or where using any other
data structure is possible. (Hint: the flags for vmalloc really only
should be used for DMA vs normal or HIGH pages.)

-ben

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