From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CA7CC3A5A9 for ; Mon, 4 May 2020 15:50:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F21E820705 for ; Mon, 4 May 2020 15:50:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.b="v4XGEZQ2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F21E820705 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chrisdown.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9D9DB8E0053; Mon, 4 May 2020 11:50:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9642F8E0024; Mon, 4 May 2020 11:50:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 851FE8E0053; Mon, 4 May 2020 11:50:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0210.hostedemail.com [216.40.44.210]) by kanga.kvack.org (Postfix) with ESMTP id 6AEA58E0024 for ; Mon, 4 May 2020 11:50:47 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 3080E180AD80F for ; Mon, 4 May 2020 15:50:47 +0000 (UTC) X-FDA: 76779474534.27.fifth96_41091948bfa3a X-HE-Tag: fifth96_41091948bfa3a X-Filterd-Recvd-Size: 3732 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Mon, 4 May 2020 15:50:46 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id x4so32040wmj.1 for ; Mon, 04 May 2020 08:50:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=LgkQr14i6DpzayCbH4GPMJK7ihdyCZl0xGQzVmYaGJs=; b=v4XGEZQ2E8drGmfxubigoZguUZMadKix7DGI/rXCAu83A4FfuOxh8ix48YLzLCtgI/ tcIKI0f7C9fhDbGhWBO/8J20IvB2f7l0L2pqr7E1GuluAdxnU35u4bLqEgwNzdKQiCGS O/FsyEklbt/7XPuusoHgbR8xIZVF8CcO2ikN4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=LgkQr14i6DpzayCbH4GPMJK7ihdyCZl0xGQzVmYaGJs=; b=BzwJ6SX7/Rse2H6keA2kUPATOpM9v4IdBJAWMAQcIOAcRoNqGitn1S517v/HuJZu5j 628B6iEiWvNd7y2p3o9enOIMPjWiSO1R8bG2t1t0pKFlgfvOxw8wdc8FBswEyOJAJvUR k8KWE5lR2urfGau72uMGlI72zQGfHFIBvjFIqxSh9snxU60iPDo7iVEm88J+2s2BnBGa AcVtSiegKOTBmAWczZNFbGySxEOK1PWIxKylqIJjRI1bXbvBol4f5qvE+RxlPECTjxSD r3p0r997/gvI/Zo99CdLd9qvmLGC6u6+g5hlfZRA6gKNO4+wU3nkoYMHYy2JaUDKcTuG z9Ew== X-Gm-Message-State: AGi0Pua9XVdTWAQra9J61yxyPC1ThoXKIj61LiLfnk3GQPErqpiCA3Di AMyxBtyiz+raGdqPuCpCWj2PoA== X-Google-Smtp-Source: APiQypLNRS/Je47Nmz7ISGfvRaO0de1cCMmWgW7nfA409mXrQbqVy8UT4ni0ta4YxSqeiwfvcbFgcw== X-Received: by 2002:a7b:c181:: with SMTP id y1mr16440236wmi.83.1588607445603; Mon, 04 May 2020 08:50:45 -0700 (PDT) Received: from localhost ([2620:10d:c092:180::1:2028]) by smtp.gmail.com with ESMTPSA id j17sm20504056wrb.46.2020.05.04.08.50.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 08:50:44 -0700 (PDT) Date: Mon, 4 May 2020 16:50:44 +0100 From: Chris Down To: Yafang Shao Cc: akpm@linux-foundation.org, shakeelb@google.com, hannes@cmpxchg.org, mhocko@kernel.org, guro@fb.com, gthelen@google.com, linux-mm@kvack.org Subject: Re: [PATCH v2 1/2] mm, memcg: rename mem_cgroup_out_of_memory() Message-ID: <20200504155044.GA271310@chrisdown.name> References: <20200504042621.10334-1-laoar.shao@gmail.com> <20200504042621.10334-2-laoar.shao@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200504042621.10334-2-laoar.shao@gmail.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000997, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Yafang Shao writes: >Rename mem_cgroup_out_of_memory() to mem_cgroup_oom_kill() to indicate >that this function is used to try to kill a process. >With this change it will cooperate better with the oom events. > function memcg event > mem_cgroup_oom() oom > mem_cgroup_oom_kill() oom_kill Hmm. The reason it's called mem_cgroup_out_of_memory() is, as Michal said, to match out_of_memory, which may or may not OOM kill. Internally, mem_cgroup_out_of_memory() may also do this depending on the state of oom_lock and the current task, so mem_cgroup_out_of_memory() is really about *deciding* what to do when generically out of memory rather than necessarily OOM killing something (although yes, that's the general outcome). Is matching the memcg event names the only reason you'd like to do this, or are there more concerns you had? If that's the only case, I think let's keep it as is for now. :-)