Message ID | 20180711120121.25635-1-mhocko@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 526E46028E for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 11 Jul 2018 12:01:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 44A8628E4B for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 11 Jul 2018 12:01:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 38DA928E54; Wed, 11 Jul 2018 12:01:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C1F4028E4B for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 11 Jul 2018 12:01:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B3F2C6B0276; Wed, 11 Jul 2018 08:01:29 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id AEE356B028A; Wed, 11 Jul 2018 08:01:29 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9BB086B028C; Wed, 11 Jul 2018 08:01:29 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by kanga.kvack.org (Postfix) with ESMTP id 561586B0276 for <linux-mm@kvack.org>; Wed, 11 Jul 2018 08:01:29 -0400 (EDT) Received: by mail-wr1-f69.google.com with SMTP id z13-v6so3188211wrq.3 for <linux-mm@kvack.org>; Wed, 11 Jul 2018 05:01:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id; bh=p+DsmytoCm1k5u6GKbImO3pLjQkmS1zMYiXb5ppcJos=; b=H9+mZ3HTwbrnHKUUHBsVWwnkfxrnXrLDLJHm8O7e4EJF27asrGPJdXr2f2EVcYeSW3 DybnaEHD+yxgIBV9WUgfx9/DmgVSmWl/aR9TvBAWPmK+9RBJqQFJ3zwYdcY/lCG3Zrqr 1BhAciGx7ZVKDSHjGMHfO2Bo74k33w5Lyiid6KvWv9qslbh82/F4odeDk5vibrOpOT2w 0rwYPQbRCGGGRdl+/JWT5G/dfz1sRheZKQbO6oHkO3tgHo2V36EDBpALybmljvFt03+f ZoF3XXoTbjt8kCrYGkKk4zTb7xGd9LLa/+esvvayGFPj4JznWpGsoG/TRJix84dhT2Db pNTg== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of mstsxfx@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=mstsxfx@gmail.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Gm-Message-State: AOUpUlEgTV53dh4RWkNISEvOjCrMmmZeBl7NXKSmfdzewiQNvSGJz3aG VySdgoxQoxvZGrPBuEu6sg1P0z/maU3sLvudl4BMa6cav2HqMAFtE9cgXgvVyW95+5kVNDEjXe7 +d4qyXh/DKUxCg6NQrtlIZKVFjeNRGeaKVUtQRJNJU0EHXF+SvNS+P2MxbNO8aIJunM8DnEkP47 fdr/uoDHTTBgm2lTwh1i3JlLWs3+juxE9d6vgJ8R6xxAI3qmO48DRgzkMzj3gORgWN1M2Dv5QW5 /c0gHoZWeTVBZmTsR1WMw20mvzU/m56GLi8qKjZzt3mXaicBhinbX/W1gHkWw6sVCNSrHk9cQXx SmBQtC4vwLYlJ99sBgSJZN/ORKPziBQ7f4ANBUV0LDnswIAHWQ94ThKETjavu5txU0/uheoSMw= = X-Received: by 2002:a1c:1004:: with SMTP id 4-v6mr7609624wmq.68.1531310488897; Wed, 11 Jul 2018 05:01:28 -0700 (PDT) X-Received: by 2002:a1c:1004:: with SMTP id 4-v6mr7609587wmq.68.1531310488253; Wed, 11 Jul 2018 05:01:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531310488; cv=none; d=google.com; s=arc-20160816; b=YXUdugtmV3peGG6P95vSaXgqrmqXaMelAQB1sPSCqg1ZCmBtVu7bkEzbm7jITk6Pa2 71aTWL8DSahJB92Lno0B+VapQkP0qqb4ZI+tuX067LBomUlzC4xZXMk5RuBNGF0iQ/TQ +Tyn1DFiUctc6ab/SWUdiFTxg0IhXlVxcY0vU8yqe33EObjD3lR717qqHExim7GD8Ucj J8KgTi3swIK7gz3IOobXhXlndt3Mk/eVQkMdYuj3YabV1BK18eWcIdg7vaSOxjTvEd4x iwLiBTAyChD0o1d3JLEczZ38hKWS/Odc85DUsWi6Z9HSjIiIuf/Md68U9ccgbcACSace cfXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:arc-authentication-results; bh=p+DsmytoCm1k5u6GKbImO3pLjQkmS1zMYiXb5ppcJos=; b=JSFwibZqLTqN4VmLeGJmapjpMxaAOqpob5CDKUX1/6x0Ux/qhS2AfpJhMPp3iG4qx0 MTG4LgB2LaBVzBVzMbto2DrFTWt2CeinvGBcno6TwdZOypGvS1XKCdZH9W2o7Rt544AX AMJkfkCL6YV6f39ifGg8er4Ar/lRC5ujrhjaV6dj2knxViF/zrPqCHRhEJISQmjuQ6Zf 4KKpWskKs8MlhRh5yU4qJn2fcNUG4gGqbV5nI+RmUR/iRO8gYNzJ61yqK4ihVlwsziMs jUpoHP2knZwtmNXobb3bwbcn2yamj5mrU6EegkSYNAlBrsbsPS5PuWHP/T6jG9T6zrGe Qr+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of mstsxfx@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=mstsxfx@gmail.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id w198-v6sor476053wmw.56.2018.07.11.05.01.28 for <linux-mm@kvack.org> (Google Transport Security); Wed, 11 Jul 2018 05:01:28 -0700 (PDT) Received-SPF: pass (google.com: domain of mstsxfx@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; spf=pass (google.com: domain of mstsxfx@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=mstsxfx@gmail.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Google-Smtp-Source: AAOMgpfk5UJeLjFCZWC64ocX3SI6NT6jLNlUoXNj0GRrUKWGLAAkMRuvKNwSLMmfCkRnEk9iFpK2lg== X-Received: by 2002:a1c:b94c:: with SMTP id j73-v6mr18623025wmf.104.1531310487918; Wed, 11 Jul 2018 05:01:27 -0700 (PDT) Received: from tiehlicka.suse.cz (ip-37-188-144-122.eurotel.cz. [37.188.144.122]) by smtp.gmail.com with ESMTPSA id j11-v6sm20749703wrr.37.2018.07.11.05.01.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jul 2018 05:01:27 -0700 (PDT) From: Michal Hocko <mhocko@kernel.org> To: Andrew Morton <akpm@linux-foundation.org> Cc: David Rientjes <rientjes@google.com>, Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>, <linux-mm@kvack.org>, LKML <linux-kernel@vger.kernel.org>, Michal Hocko <mhocko@suse.com> Subject: [PATCH] mm, oom: document oom_lock Date: Wed, 11 Jul 2018 14:01:21 +0200 Message-Id: <20180711120121.25635-1-mhocko@kernel.org> X-Mailer: git-send-email 2.18.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index ed9d473c571e..32e6f7becb40 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -53,6 +53,14 @@ int sysctl_panic_on_oom; int sysctl_oom_kill_allocating_task; int sysctl_oom_dump_tasks = 1; +/* + * Serializes oom killer invocations (out_of_memory()) from all contexts to + * prevent from over eager oom killing (e.g. when the oom killer is invoked + * from different domains). + * + * oom_killer_disable() relies on this lock to stabilize oom_killer_disabled + * and mark_oom_victim + */ DEFINE_MUTEX(oom_lock); #ifdef CONFIG_NUMA