• Andrew Morton's avatar
    [PATCH] remove the buffer_head mempool · 3322be32
    Andrew Morton authored
    mempools have the wrong semantics for use by buffer_heads.  The problem
    scenario:
    
    - Process A calls mempool_alloc(), asking for a buffer_head.
    
    - While process A sleeps, process B frees up a ton of memory.
    
    That's it.  There is no longer any memory pressure, so nobody frees any
    buffer_heads, so process A does not get woken up.  I managed to trigger this
    in some testing recently.
    
    One approach would be to use a schedule_timeout(2) in mempool_alloc().
    
    Anyway, the importance of buffer_head allocation was lessened when swapout
    stopped using them, so let's just drop the mempool out of it for now.
    3322be32
buffer.c 74.5 KB