[lkml]   [1998]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Notebooks
    In article <6rd6ek$sr9$>, (Matthias Urlichs) writes:
    > (Linus Torvalds) writes:
    >> In this case, TCP wanted to allocate a single skb, and due to slabs this
    >> got turned into a multi-page request even though it fit perfectly fine
    >> into one page. Thus a critical allocation could fail, and the TCP layer
    >> started looping - and kswapd could never even try to fix it up because
    >> the TCP code held the kernel lock.
    > Methinks that TCP ought to be able to recover from out-of-memory conditions,
    > just like any other part of the kernel. If slabs make those things which
    > fall over when they don't get their memory fall over more often, that's
    > fine with me: it means we get to find more bugs. ;-)

    Me thinks it should have a better way to recover from out-of-memory errors
    though than:

    (from tcp_send_fin)

    /* Socket is locked, keep trying until memory is available. */
    do {
    skb = sock_wmalloc(sk,
    1, GFP_KERNEL);
    } while (skb == NULL);

    It would be better to return ENOMEM after a few iterations, even if it means
    that the fin is not send. It is probably too late in the code freeze to fix
    it properly now, but I wouldn't be surprised if it leads to more deadlocks
    in the future.


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:44    [W:0.018 / U:13.232 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site