lkml.org 
[lkml]   [2015]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch 01/12] mm: oom_kill: remove unnecessary locking in oom_enable()
    On Wed 25-03-15 02:17:05, Johannes Weiner wrote:
    > Setting oom_killer_disabled to false is atomic, there is no need for
    > further synchronization with ongoing allocations trying to OOM-kill.

    True, races with an ongoing allocations are not harmful.

    > Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>

    Acked-by: Michal Hocko <mhocko@suse.cz>

    > ---
    > mm/oom_kill.c | 2 --
    > 1 file changed, 2 deletions(-)
    >
    > diff --git a/mm/oom_kill.c b/mm/oom_kill.c
    > index 2b665da1b3c9..73763e489e86 100644
    > --- a/mm/oom_kill.c
    > +++ b/mm/oom_kill.c
    > @@ -488,9 +488,7 @@ bool oom_killer_disable(void)
    > */
    > void oom_killer_enable(void)
    > {
    > - down_write(&oom_sem);
    > oom_killer_disabled = false;
    > - up_write(&oom_sem);
    > }
    >
    > #define K(x) ((x) << (PAGE_SHIFT-10))
    > --
    > 2.3.3
    >
    > --
    > To unsubscribe, send a message with 'unsubscribe linux-mm' in
    > the body to majordomo@kvack.org. For more info on Linux MM,
    > see: http://www.linux-mm.org/ .
    > Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

    --
    Michal Hocko
    SUSE Labs


    \
     
     \ /
      Last update: 2015-03-26 13:01    [W:4.046 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site