Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965106AbbD0TGk (ORCPT ); Mon, 27 Apr 2015 15:06:40 -0400 Received: from gum.cmpxchg.org ([85.214.110.215]:47288 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964943AbbD0TGb (ORCPT ); Mon, 27 Apr 2015 15:06:31 -0400 From: Johannes Weiner To: Andrew Morton Cc: Michal Hocko , Tetsuo Handa , Andrea Arcangeli , Dave Chinner , David Rientjes , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/9] mm: oom_kill: remove unnecessary locking in oom_enable() Date: Mon, 27 Apr 2015 15:05:47 -0400 Message-Id: <1430161555-6058-2-git-send-email-hannes@cmpxchg.org> X-Mailer: git-send-email 2.3.6 In-Reply-To: <1430161555-6058-1-git-send-email-hannes@cmpxchg.org> References: <1430161555-6058-1-git-send-email-hannes@cmpxchg.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 915 Lines: 32 Setting oom_killer_disabled to false is atomic, there is no need for further synchronization with ongoing allocations trying to OOM-kill. Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Acked-by: David Rientjes --- mm/oom_kill.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 2b665da..73763e4 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.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/