• Tetsuo Handa's avatar
    signal: make oom_flags a bool · c96fc2d8
    Tetsuo Handa authored
    Currently the size of "struct signal_struct"->oom_flags member is
    sizeof(unsigned) bytes, but only one flag OOM_FLAG_ORIGIN which is
    updated by current thread is defined.  We can convert OOM_FLAG_ORIGIN
    into a bool, and reuse the saved bytes for updating from the OOM killer
    and/or the OOM reaper thread.
    
    By the way, do we care about a race window between run_store() and
    swapoff() because it would be theoretically possible that two threads
    sharing the "struct signal_struct" concurrently call respective
    functions? If we care, we can make oom_flags an atomic_t.
    Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
    Cc: Hugh Dickins <hughd@google.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    c96fc2d8
oom.h 3.34 KB