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.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 1A4C0C432C3 for ; Wed, 27 Nov 2019 11:56:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D330C2053B for ; Wed, 27 Nov 2019 11:56:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bPx36Uei" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D330C2053B 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 70B036B0391; Wed, 27 Nov 2019 06:56:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6BBE76B0392; Wed, 27 Nov 2019 06:56:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D0F06B0393; Wed, 27 Nov 2019 06:56:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0094.hostedemail.com [216.40.44.94]) by kanga.kvack.org (Postfix) with ESMTP id 487766B0391 for ; Wed, 27 Nov 2019 06:56:31 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 05577442C for ; Wed, 27 Nov 2019 11:56:31 +0000 (UTC) X-FDA: 76201904982.20.cover19_730ea74b17d54 X-HE-Tag: cover19_730ea74b17d54 X-Filterd-Recvd-Size: 3890 Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by imf41.hostedemail.com (Postfix) with ESMTP for ; Wed, 27 Nov 2019 11:56:30 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id s3so24557438ioe.3 for ; Wed, 27 Nov 2019 03:56:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uHvoChkR3D9RWrPUn/Z/Rc6UNbcCUJdhzbB8eaWld/I=; b=bPx36Uei1ns6PCAPrVMliBkjAgL+R8xIrMW0U2VzpJqLJDWi1wtBdqT7crc9jlYPZQ OeFXMoCS7TO+Nuohwcju9k8COlAGHdZ95RWqyfgDShA5EqqHxSCZtkH52g2tbH8KdCVf 980vcD1XsttdEcEnT2H/NW6/BnnMUzg92rIW3f8QlbQekQ4f78w7HGwmkqhfsuArYvK1 bA7m7R43tqMGVuBj2n3htrPKY9VoQtkOH5gFq55iP16Liimjf8uBJLzGk2lfepsCdWAN U2WoZH59XjCXNRKm5Me5IW6VBhqhck0hzQ374HZWV17T7B9qvd0KOfTjmmlSql3fo38A 4Y/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uHvoChkR3D9RWrPUn/Z/Rc6UNbcCUJdhzbB8eaWld/I=; b=m0P22xGKFTjiCc9IiOhXf4gaMnMyP+1YUkEmEMUF9T9xYtvyvIu4C6zgmYxreVw9sP o1ReRmjjdoKVfqEKETVjcxjdvA0jsMUpfWWAiYju78vKEYENcI4yGRWJXSn6kXrLb5qa U/rfXnhZB+w2HIA4RCsZnyBhe7g+SBpBYMQ2QCrS4UwjuXvZ9KxgiINmi61KWl0AibTH EU8FtQ/2QnWkchnogo+75JES8quzAlc72BADFo5TX5UmxIDCZKlvFuHofmgxlkECMuZa n8D9DiwAtsZ494nFTXrCSjNWykuRHWVvzVaPz4duZ16aUAwXtwRELisL0zwDc8fgVMIe tEZA== X-Gm-Message-State: APjAAAXl8Kppj20c2Ddvt/ywZt3cDfUcb70vRLMTJunUNhl9+sRxtDcd lG3GHM+F2KWxSEJ4iEx+lsQaPkHM5KimDxo5cls= X-Google-Smtp-Source: APXvYqxP39A2i8MlCcJxug+DfAAmQRIPVkuhckG2kHtoILlooA+bq/ltJgiisvhwprtmTDqgWNkQZ4+EpqO6c0VMMPg= X-Received: by 2002:a5e:8e03:: with SMTP id a3mr5754433ion.137.1574855789832; Wed, 27 Nov 2019 03:56:29 -0800 (PST) MIME-Version: 1.0 References: <1574818117-2885-1-git-send-email-laoar.shao@gmail.com> <20191127114125.GO20912@dhcp22.suse.cz> In-Reply-To: <20191127114125.GO20912@dhcp22.suse.cz> From: Yafang Shao Date: Wed, 27 Nov 2019 19:55:53 +0800 Message-ID: Subject: Re: [PATCH v2] mm, memcg: avoid oom if cgroup is not populated To: Michal Hocko Cc: David Hildenbrand , Johannes Weiner , Vladimir Davydov , Andrew Morton , Linux MM Content-Type: text/plain; charset="UTF-8" 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: On Wed, Nov 27, 2019 at 7:41 PM Michal Hocko wrote: > > On Wed 27-11-19 12:11:24, David Hildenbrand wrote: > [...] > > 4. This patch on its own (if there are no processes, there is nothing to > > kill) does not sound too wrong to me. Instead of an endless loop > > (besides signals) where we can't make any progress, we exit right away. > > mem_cgroup_out_of_memory returns false when there is no oom victim > selected and then we break out. > > My main objection to the patch is that it adds a subtle inconsitency. I don't want to argue inconsitency or consitency with you. > Admins are simply not going to see that the memcg was OOM due to the > limit change and OOM killer cannot do anything about that. Printing something like "OOM and no tasks" can esily fix this issue, if you insist that we should print something. You can ignore my feedback if you would like to. > No tasks vs. > no killable task doesn't make any real difference. There is simply no > way to get out of that situation. Well, I don't want to argue with you again. Thanks Yafang