[lkml]   [2007]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subjectshared memory is over-counted N times when calculating badness()
    In oom_kill.c, badness() counts half the total_vm of all the children
    against the parent.

    The problem with this calculation is that, if the parent and children
    share memory, the shared memory is over-counted N/2 times where N is the
    number of children.

    There's already a hard limit on the amount of shared memory, so it's
    unlikely that process is runaway due to shared memory consumption, and
    shouldn't add to a process's badness() score.

    Shouldn't it just use (total_vm - shared_vm) instead, and never even
    count shared memory?

    Jeff Davis

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

     \ /
      Last update: 2007-02-12 23:11    [W:0.019 / U:3.896 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site