lkml.org 
[lkml]   [2009]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/5] mm: Add __GFP_NO_OOM_KILL flag
    On Thu, 7 May 2009, Andrew Morton wrote:

    > The setting and clearing of that thing looks gruesomely racy..
    >

    It's not racy currently because zone_scan_lock ensures ZONE_OOM_LOCKED
    gets test/set and cleared atomically for the entire zonelist (the clear
    happens for the same zonelist that was test/set).

    Using it for hibernation in the way I've proposed will open it up to the
    race I earlier described: when a kthread is in the oom killer and
    subsequently clears its zonelist of ZONE_OOM_LOCKED (all other tasks are
    frozen so they can't be in the oom killer). That's perfectly acceptable,
    however, since the system is by definition already oom if kthreads can't
    get memory so it will end up killing a user task even though it's stuck in
    D state and will exit on thaw; we aren't concerned about killing
    needlessly because the oom killer becomes a no-op when it finds a task
    that has already been killed but hasn't exited by way of TIF_MEMDIE.


    \
     
     \ /
      Last update: 2009-05-08 01:03    [W:4.570 / U:0.092 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site