lkml.org 
[lkml]   [2007]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [Intel IOMMU 06/10] Avoid memory allocation failures in dma map api calls
    From
    Date
    On Wed, 2007-06-20 at 12:14 -0700, Arjan van de Ven wrote:
    > Peter Zijlstra wrote:
    > > So a reclaim context (kswapd and direct reclaim) set PF_MEMALLOC to
    > > ensure they themselves will not block on a memory allocation. And it is
    > > understood that these code paths have a bounded memory footprint.
    >
    >
    > that's a too simplistic view though; what happens is that kswapd will
    > queue the IO, but the irq context will then take the IO from the queue
    > and do the DMA mapping... which needs the memory.....

    Right, but who stops some unrelated interrupt handler from completely
    depleting memory?

    What I'm saying is that there should be some coupling between the
    reclaim context and the irq context doing work on its behalf.

    For instance, you know how many pages are in the queue, and which queue.
    So you could preallocate enough memory to handle that many pages from
    irq context and couple that reserve to the queue object. Then irq
    context can use that memory to do the work.



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

    \
     
     \ /
      Last update: 2007-06-20 22:11    [W:4.104 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site