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=-4.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 C9E32C433DF for ; Tue, 14 Jul 2020 02:13:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8B76021973 for ; Tue, 14 Jul 2020 02:13:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BBzaioDf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8B76021973 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 E36738D0002; Mon, 13 Jul 2020 22:13:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DE6F68D0001; Mon, 13 Jul 2020 22:13:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CFD0C8D0002; Mon, 13 Jul 2020 22:13:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0085.hostedemail.com [216.40.44.85]) by kanga.kvack.org (Postfix) with ESMTP id BA4CD8D0001 for ; Mon, 13 Jul 2020 22:13:50 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 53B4B180AD817 for ; Tue, 14 Jul 2020 02:13:50 +0000 (UTC) X-FDA: 77035060620.10.bed39_210d30b26eed Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id 2603E16A4A4 for ; Tue, 14 Jul 2020 02:13:50 +0000 (UTC) X-HE-Tag: bed39_210d30b26eed X-Filterd-Recvd-Size: 3693 Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Tue, 14 Jul 2020 02:13:49 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id f23so15712993iof.6 for ; Mon, 13 Jul 2020 19:13:49 -0700 (PDT) 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=I/a7IUpiH1diTRgXnn6TTpkZT2dMWn8zbYFI/kSnV8o=; b=BBzaioDftofMaq1VLV8HFhOaEgwBQ9L1IiCoayZGJmV7Tn176mJFhOc5jq9Ejw6u4d aGzrT5irF4m1eWdllT53OlMyrvQUbinrR4GAD99qtmk3RKS72doncR9tP24uW+RS5mkA ONY860jNreS1KWTZCPt6XYjP0G6NIPODTx4bEJPL9YlgkvrAOF6rxSUxnYdL97HEsp6R 26aRZWZ+ZkGkUQueJw22FYaj6PdyjkCcMH8LXpRgVGDtgYPnkdN2PRUjb2mc94R9FraM 4gtECagkLRZ1Pyw5dZT0EodgmpGensAqpiKpN2c00a+X0QFWZ9lFzrJ80XoUXdeBgEwf THXw== 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=I/a7IUpiH1diTRgXnn6TTpkZT2dMWn8zbYFI/kSnV8o=; b=AyuzMlgkVCBIxK0wEKJ1WlzycC8+7nmePMhd/VfvA5LdJ1JYrw3RUFcDUM4FJlO3Xp 329fGUMbjYORzgWE1gvGzSVCLifmQvQEhLNSWpf4nxnvtLpzlKKH1VApVsqBUFd/EZQa rO5swXMKacFizkH8dylxcYGJMlLSEwErVkH83v+UZts34ux/eA9W6zAXjX8/y6utT73W 4EsTmIVo+wAwFNFGdnOWLQryUvhaam0+aAFEY1UzYReocOw/Yze+qzHPhWnHoPu/wL/G g3fNSO2iJBtQfk0+u7oztIKKdOGs1VgqzxBYgVi1p/3Pjrp+JsYYRoO3kywW92lInLH/ g5Hg== X-Gm-Message-State: AOAM530eto7F2tE2LkpJZyMuGfjipo7sg88dFkBDWz3bgOGD5JHJuwM6 VTi1jI3DhN9St3+zyR5JKgFx3fabT+a45FUpzXQ= X-Google-Smtp-Source: ABdhPJxrSwpX+5z8Q4JJUfC4KYtizRNL7oUrYjeY2QKMJmH+PvS+RVW4b4PvFplDLt+p6wYWNJ/ir0alCwcheak3Mq0= X-Received: by 2002:a02:6514:: with SMTP id u20mr3303234jab.94.1594692829205; Mon, 13 Jul 2020 19:13:49 -0700 (PDT) MIME-Version: 1.0 References: <1594437481-11144-1-git-send-email-laoar.shao@gmail.com> <06806cf0-a122-e002-191f-348298358882@i-love.sakura.ne.jp> In-Reply-To: <06806cf0-a122-e002-191f-348298358882@i-love.sakura.ne.jp> From: Yafang Shao Date: Tue, 14 Jul 2020 10:13:13 +0800 Message-ID: Subject: Re: [PATCH] mm, oom: don't invoke oom killer if current has been reapered To: Tetsuo Handa Cc: Michal Hocko , David Rientjes , Andrew Morton , Linux MM Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 2603E16A4A4 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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 Tue, Jul 14, 2020 at 7:50 AM Tetsuo Handa wrote: > > On 2020/07/11 12:18, Yafang Shao wrote: > > If the current's MMF_OOM_SKIP is set, it means that the current is exiting > > or dying and likely to realease its address space. So we don't need to > > invoke the oom killer again. Otherwise that may cause some unexpected > > issues, for example, bellow is the issue found in our production > > environment. > > What kernel version are you using? > The kernel version is 4.18. > Commit 7775face207922ea ("memcg: killed threads should not invoke memcg OOM killer") > should solve this problem. Yes, this commit should fix this issue. Thanks for the information. But it seems the proposal that using trylock in mem_cgroup_out_of_memory() should be better? The trylock could also solve the problem that different processes are doing oom at the same time. -- Thanks Yafang