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.0 required=3.0 tests=BAYES_00,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 A013FC433E1 for ; Tue, 14 Jul 2020 06:43:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6DA53221E7 for ; Tue, 14 Jul 2020 06:43:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6DA53221E7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D856C8D0002; Tue, 14 Jul 2020 02:43:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D0EC48D0001; Tue, 14 Jul 2020 02:43:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BD55D8D0002; Tue, 14 Jul 2020 02:43:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0135.hostedemail.com [216.40.44.135]) by kanga.kvack.org (Postfix) with ESMTP id A4D8F8D0001 for ; Tue, 14 Jul 2020 02:43:17 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 42BE32DFC for ; Tue, 14 Jul 2020 06:43:17 +0000 (UTC) X-FDA: 77035739634.28.hot39_531513a26eee Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id 0FB486C3E for ; Tue, 14 Jul 2020 06:43:17 +0000 (UTC) X-HE-Tag: hot39_531513a26eee X-Filterd-Recvd-Size: 3289 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Tue, 14 Jul 2020 06:43:16 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id f139so3512755wmf.5 for ; Mon, 13 Jul 2020 23:43:16 -0700 (PDT) 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=GNQ1cyPODwDKst9Ly1eDWYqdbe8opuDhZNoCkMsbU1E=; b=KzawiDmQsajZhkFFXAxmUPdSDKDmvkD2vJKYzW/5pFiibCwIesqZGlpjeN+t9L3xGP niyir2jzMXrJRz9aru0GNBSKFRpzps2UJkFQMsAgveO2gzASa5XOVPPdnh3edO/lAFkn eXJ4K+asxl88lQkmQPorJVuIzCwgGSdIkS7S6JrJQJVLhQrVKPj0fjt0e4GkL89StTqv NxbduELhFfZjLeRcscupWHVrE36rEE8KxHEw5rRGxcp2k6lQU+NanudqaeQ0cWcaNsFM T21nhpMYrjjeT+DzzDWsvybcdpC1AIK+Ks+6WckBeU8OqZRgwoObOc0nUmJxK+fmWaTd HT/A== X-Gm-Message-State: AOAM533w/35dsit8ICVNrn5K8+NI8aofC9zliz+cHqDL5ph77qMWKXZ/ iyVzr74C4QymihMZe83BjgE= X-Google-Smtp-Source: ABdhPJzrkksagSlvd7yC4XkA33LMVjFLmgbMiki9lrP/e51XurhLKUJSnUvOnpKbUKqwGRyt8ocjCQ== X-Received: by 2002:a05:600c:241:: with SMTP id 1mr2740323wmj.119.1594708995616; Mon, 13 Jul 2020 23:43:15 -0700 (PDT) Received: from localhost (ip-37-188-148-171.eurotel.cz. [37.188.148.171]) by smtp.gmail.com with ESMTPSA id h2sm26113030wrw.62.2020.07.13.23.43.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 23:43:14 -0700 (PDT) Date: Tue, 14 Jul 2020 08:43:13 +0200 From: Michal Hocko To: Tetsuo Handa Cc: Yafang Shao , rientjes@google.com, akpm@linux-foundation.org, linux-mm@kvack.org Subject: Re: [PATCH] mm, oom: don't invoke oom killer if current has been reapered Message-ID: <20200714064313.GB24642@dhcp22.suse.cz> References: <1594437481-11144-1-git-send-email-laoar.shao@gmail.com> <06806cf0-a122-e002-191f-348298358882@i-love.sakura.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <06806cf0-a122-e002-191f-348298358882@i-love.sakura.ne.jp> X-Rspamd-Queue-Id: 0FB486C3E X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000183, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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. -- Michal Hocko SUSE Labs