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 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 1BC2FC433E1 for ; Tue, 14 Jul 2020 09:31:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D4997208C3 for ; Tue, 14 Jul 2020 09:31:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IcqXD13I" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D4997208C3 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 640BF6B0005; Tue, 14 Jul 2020 05:31:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5F1956B0006; Tue, 14 Jul 2020 05:31:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4DF616B0007; Tue, 14 Jul 2020 05:31:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0078.hostedemail.com [216.40.44.78]) by kanga.kvack.org (Postfix) with ESMTP id 3786D6B0005 for ; Tue, 14 Jul 2020 05:31:02 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 97D50180AD802 for ; Tue, 14 Jul 2020 09:31:01 +0000 (UTC) X-FDA: 77036162322.01.owner59_13103be26eef Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin01.hostedemail.com (Postfix) with ESMTP id 7A6B260001FB88CA for ; Tue, 14 Jul 2020 09:31:01 +0000 (UTC) X-HE-Tag: owner59_13103be26eef X-Filterd-Recvd-Size: 3920 Received: from mail-il1-f195.google.com (mail-il1-f195.google.com [209.85.166.195]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Tue, 14 Jul 2020 09:31:01 +0000 (UTC) Received: by mail-il1-f195.google.com with SMTP id k6so13650768ili.6 for ; Tue, 14 Jul 2020 02:31:00 -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=RD+nj8C6j6qBUzqx6h/+ZhqH8tskxqlEvXYfkde0mMo=; b=IcqXD13Illsb6Gg3a9rXpfvdlB2DbVWZIdhssIcXGvg+WTVT2N9itUYnB23gT9XFdA DcDba63sxZI3uKtR7H6uXem2IMSiLhtPAeNLq7V5dL7yRx59whkGqJKyBZ3IxZO6pxVl kSYxtGtXv+HWRDqZPUWsfvlIHXyX8GmonpsFAhBIahc0ePn7EL5tIv2kh2h9J2VxxTWk gVCt7O13tkCPYxT8GIXPdQPSQTvvHg0c4ILHw7rk12zRBW7AFkuM5BLomguVcrWoS8lS olgYmT+BmpklWj/1yjtea+r3lOdHmEQBncQftrFsKQRrKiteLegGXsd+KzSuf4iPuXRp NPDw== 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=RD+nj8C6j6qBUzqx6h/+ZhqH8tskxqlEvXYfkde0mMo=; b=enuxJcaWDB/9BkbxdF7EZzwC8AWcNs/nancnYw148t8ieDuM4siCWEOKT5LCYdsR0R w1KhXbhVAhkHQu3DotDi71N3GYpv51EhNa6t1HQa4wDYL9HUZhTpSCze7iTHYY/DZbs9 j5kyIT8HlkVZouY00JCmTp/8Fy9GhCqJx5bXbuIkGsNAbU/CRIsis/ImB80yBxpJiQRk 7mVBZfj15TqwmvyqEpTqlR41/wmDa8xA4eao7Y6Oy7XVmfWO6vEsyregojUm2Gez96Wh Pg2S2mwqy6ESmHmeUWcpcBA30J9bLddj5sBKUPAVFkZPa+TumajKE7xOsOYM4CqRv23e lUjQ== X-Gm-Message-State: AOAM531mnK17052K36HsYe2scXj8jD6jYUP/zC/ibyPleFRMv1utS60M OhMAv2UEbrvPNwH3qt8RnPBVMuRtHWoZOda+sOw= X-Google-Smtp-Source: ABdhPJzR+rWUbhJlGP9fFTETLNmExg/CVaSy4i1dBV9SmgevrVSZn1K2qEMZrqxmxhVYPmjgfMRqagU2JI4T1rNALEM= X-Received: by 2002:a92:1b8c:: with SMTP id f12mr3821873ill.93.1594719060560; Tue, 14 Jul 2020 02:31:00 -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> <20200714064313.GB24642@dhcp22.suse.cz> In-Reply-To: <20200714064313.GB24642@dhcp22.suse.cz> From: Yafang Shao Date: Tue, 14 Jul 2020 17:30:24 +0800 Message-ID: Subject: Re: [PATCH] mm, oom: don't invoke oom killer if current has been reapered To: Michal Hocko Cc: Tetsuo Handa , David Rientjes , Andrew Morton , Linux MM Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 7A6B260001FB88CA X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, 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 2:43 PM Michal Hocko wrote: > > On Tue 14-07-20 08:50:57, 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? > > > > Commit 7775face207922ea ("memcg: killed threads should not invoke memcg OOM killer") > > should solve this problem. > > I haven't really seen the oom report but this would solve only half of > the problem. It is still possible that other tasks from the oom memcg > hierarchy can be blocked on the oom lock and then observe the oom reaped > tasks. The trylock or the check for the margin is needed to address the > other half of the problem. Agreed. Different tasks doing memcg oom in the same memcg should also be resolved. I will send a patch for it. -- Thanks Yafang