Thread (28 messages) flat view 28 messages, 5 authors, 2002-06-15

Re: [PATCH] pci_alloc_consistent in an interrupt context

From: Eugene Surovegin <hidden>
Date: 2002-06-13 22:23:00

Dan,

At 02:47 PM 6/13/2002, you wrote:
It's not quite right.......

The consistent_alloc() should not always call get_vm_area() with GFP_ATOMIC
set.  It should use the 'gfp' that is passed into consistent_alloc().
Normally, you will call consistent_alloc() with GFP_KERNEL, and
interrupt functions must know to call the consistent allocators with
GFP_ATOMIC.
I don't think that we should use gfp passed to consisten_alloc as a
parameter for get_vm_area().

This is gfp for _memory_ itself and may contain GFP_DMA for example. I
didn't want to allocate
struct vm_area from DMA pool in that case.

May be the better solution is to mask out GFP_KERNEL or GFP_ATOMIC from gfp
and use it.

What do you think?

Eugene


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help