From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752818AbbCZLnM (ORCPT ); Thu, 26 Mar 2015 07:43:12 -0400 Received: from cantor2.suse.de ([195.135.220.15]:35930 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752398AbbCZLnJ (ORCPT ); Thu, 26 Mar 2015 07:43:09 -0400 Date: Thu, 26 Mar 2015 12:43:06 +0100 From: Michal Hocko To: Johannes Weiner Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Torvalds , Andrew Morton , Tetsuo Handa , Huang Ying , Andrea Arcangeli , Dave Chinner , "Theodore Ts'o" Subject: Re: [patch 01/12] mm: oom_kill: remove unnecessary locking in oom_enable() Message-ID: <20150326114306.GB15257@dhcp22.suse.cz> References: <1427264236-17249-1-git-send-email-hannes@cmpxchg.org> <1427264236-17249-2-git-send-email-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1427264236-17249-2-git-send-email-hannes@cmpxchg.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Michal Hocko > --- > 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: email@kvack.org -- Michal Hocko SUSE Labs From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Hocko Subject: Re: [patch 01/12] mm: oom_kill: remove unnecessary locking in oom_enable() Date: Thu, 26 Mar 2015 12:43:06 +0100 Message-ID: <20150326114306.GB15257@dhcp22.suse.cz> References: <1427264236-17249-1-git-send-email-hannes@cmpxchg.org> <1427264236-17249-2-git-send-email-hannes@cmpxchg.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Torvalds , Andrew Morton , Tetsuo Handa , Huang Ying , Andrea Arcangeli , Dave Chinner , Theodore Ts'o To: Johannes Weiner Return-path: Content-Disposition: inline In-Reply-To: <1427264236-17249-2-git-send-email-hannes@cmpxchg.org> Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org 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 Acked-by: Michal Hocko > --- > 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: email@kvack.org -- Michal Hocko SUSE Labs -- 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: email@kvack.org