From patchwork Sat May 2 14:34:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yafang Shao X-Patchwork-Id: 11523939 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A09C781 for ; Sat, 2 May 2020 14:35:24 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 632B324953 for ; Sat, 2 May 2020 14:35:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Drs8/bAb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 632B324953 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8713A8E0005; Sat, 2 May 2020 10:35:23 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 820B38E0001; Sat, 2 May 2020 10:35:23 -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 75D778E0005; Sat, 2 May 2020 10:35:23 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0139.hostedemail.com [216.40.44.139]) by kanga.kvack.org (Postfix) with ESMTP id 5B4218E0001 for ; Sat, 2 May 2020 10:35:23 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 195B382499A8 for ; Sat, 2 May 2020 14:35:23 +0000 (UTC) X-FDA: 76772026926.23.birth85_11db81d32ac5a X-Spam-Summary: 2,0,0,0c91eb0f0c9de6bf,d41d8cd98f00b204,laoar.shao@gmail.com,,RULES_HIT:41:355:379:541:988:989:1260:1345:1437:1534:1538:1711:1714:1730:1747:1777:1792:2393:2559:2562:3138:3139:3140:3141:3142:3350:3867:3871:3872:3874:5007:6119:6120:6261:6653:7901:7903:9413:10004:11026:11658:11914:12050:12297:12438:12517:12519:12895:13069:13311:13357:14384:14394:14687:21080:21444:21451:21627:21666:30029:30054,0,RBL:209.85.210.195:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: birth85_11db81d32ac5a X-Filterd-Recvd-Size: 3219 Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Sat, 2 May 2020 14:35:22 +0000 (UTC) Received: by mail-pf1-f195.google.com with SMTP id f7so3030628pfa.9 for ; Sat, 02 May 2020 07:35:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=FXcuA0qVrgrXmHiRZzltV8FPffWY2UOqzn/joWGLYKA=; b=Drs8/bAb3kNX5lLjgc7QIzApjHbkMKKN2bChwXp8I6uqixrpbxgAbBFoQ4nBRkztiI DozwvnPoaxv+wZO/qU9fyZrbYEwH9FSo89j5GMI4lDTQOu6Jno264yNXDc8LBZPFfQOE vkKRPW7OC4hdvqTsG/h5zXDewCfNQ80cXPIZuGH5V/drKyRxl0f3xEAKjN53oN2bNVbb oGV43+AazGF5TCgfkFC3l9ASrLLUrkZ1NGL4XLGWdWvfxxkRxYXo/SgbcX1aNi8YB+nL he4NZduS92RCUw69Y/EAlHstgvVPQUWaZ4ftWz2GPnfV73aDMI627EWcPZGvyM8Lxovi Wi8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=FXcuA0qVrgrXmHiRZzltV8FPffWY2UOqzn/joWGLYKA=; b=aXZTT9jWNcyb2VtL0Yd83UsE83rxWbsYGcsIqTAHMIvZRgsjK5wp6jjftzg3/8w9tq QQmzdjyfJqUFc188Xewi8Ee/r13gVQpcAWsLHNr45TDxfjtYqf6NHMUGEkZ2w49iEAqj dzzO4QqESKuzJ+vDEtkUqrqw5RLxI5Kf7HXlXINbMUA11dlx2QFKPAv1RbxneOwu8+eL hDl3rU1lusjByPBRHt5U1wvoMW3F8bq1CEWdMgmsdYYUe+kEnDH+lmuPLzRnbHGbcDr6 ywS6tjUeiXd8ySiirtcrlssdaWoUFpyw/tEhif060NTcZK2dfPrup+dEF1MTmDwI1uyP I+7Q== X-Gm-Message-State: AGi0PuakBQ1bPE0xlt+636fzLO9OMP4M9bfKHIOCYXeKeZRLJTScVfK6 OrVuryk62/FMVQoyIf9vmpU= X-Google-Smtp-Source: APiQypL9lp8anwQqFmY7s0/taqZGkBsUt8HHgswtfS/6lKVExuqLNCv+1xdQ6VpnaxwxPGuartbUvw== X-Received: by 2002:a63:f48:: with SMTP id 8mr9346872pgp.184.1588430121843; Sat, 02 May 2020 07:35:21 -0700 (PDT) Received: from localhost.localdomain ([203.100.54.194]) by smtp.gmail.com with ESMTPSA id o10sm4244867pgb.78.2020.05.02.07.35.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 May 2020 07:35:21 -0700 (PDT) From: Yafang Shao To: akpm@linux-foundation.org Cc: shakeelb@google.com, hannes@cmpxchg.org, mhocko@kernel.org, guro@fb.com, gthelen@google.com, linux-mm@kvack.org, Yafang Shao Subject: [PATCH 0/2] memcg oom: don't try to kill a process if there is no process Date: Sat, 2 May 2020 10:34:50 -0400 Message-Id: <20200502143452.7640-1-laoar.shao@gmail.com> X-Mailer: git-send-email 2.18.1 X-Bogosity: Ham, tests=bogofilter, spamicity=0.028463, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Recently Shakeel reported a issue which also confused me serveral months earlier that it still try to kill a process even if there is no process. If a memcg is not populated, it is useless to try to kill a process. mem_cgroup_out_of_memory() is renamed to mem_cgroup_oom_kill() for better understanding. Yafang Shao (2): mm, memcg: better name mem_cgroup_out_of_memory() mm, memcg: don't try to kill a process if memcg is not populated mm/memcontrol.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)