lkml.org 
[lkml]   [2000]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    Subjecttest9-pre6 and GFP_BUFFER allocations
    Hi,

    What will happen in this scenario:
    a process
    * grabs a fs semaphore
    * needs some buffers to do IO, calls __alloc_pages(GFP_BUFFER)
    Suppose the system is MIN on free mem, has no inactive_clean pages.
    We will end up around line 446 in pages_alloc.c and issue a
    try_to_free_pages(...). Then goto try_again.
    * In our case this is unlikely to work - not allowed to do IO.
    * Will we sleep? Probably not, not even in refill_inactive (no GFP_IO)
    BTW, Why can't we schedule if GFP_IO is not set???
    * Will we free any page, to get above MIN - only if there are enough
    clean pages in active list.
    * Won't we end up in an infinite loop?
    Suppose it does sleep. Will kswapd then be able to free any page
    assuming we are holding a critical fs semaphore...

    Or am I missing something, again?


    One approach could be: only goto try_again if GFP_IO is set.
    And alloc one page from the critical memory pool.
    I will try this.

    /RogerL

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

    \
     
     \ /
      Last update: 2005-03-22 12:45    [W:0.026 / U:30.624 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site