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 DCAEBC433E1 for ; Mon, 20 Jul 2020 13:42:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A658822B4D for ; Mon, 20 Jul 2020 13:42:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A658822B4D 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 2FF7D6B0006; Mon, 20 Jul 2020 09:42:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2AF536B0007; Mon, 20 Jul 2020 09:42:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 19E596B0008; Mon, 20 Jul 2020 09:42:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0101.hostedemail.com [216.40.44.101]) by kanga.kvack.org (Postfix) with ESMTP id 037306B0006 for ; Mon, 20 Jul 2020 09:42:00 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 9D3DF3F36C4A for ; Mon, 20 Jul 2020 13:42:00 +0000 (UTC) X-FDA: 77058567600.07.dock69_250949926f25 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id 915BB18287F32 for ; Mon, 20 Jul 2020 13:41:24 +0000 (UTC) X-HE-Tag: dock69_250949926f25 X-Filterd-Recvd-Size: 4108 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Mon, 20 Jul 2020 13:41:24 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id o2so25276341wmh.2 for ; Mon, 20 Jul 2020 06:41:23 -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=F+PWEncL75lt+/85E883yi7ruOSpV1dPJ9w0K5LfN1k=; b=uC5UNfXuIJUc9/vhbfs7CrFhu/fuN4WUwamGTYeuTHBhdPYJ/E8RPiSDLIp6f1RZL0 oZqt4tY/4rAAHt6AUL9GMlP6zWeFTSUs0aYQH6bA3ad+QIzjiYjQdki3/rOk/FDs3zSq HgIz6q6h+hdGjrh8slQ5cxSt9TW/ZTz+ZbNkCwYWaf9oRlVs5sgmUbBs4X1t08gwxB4t 9FeSWtmniok3mBc3Mes4m6C3JfYR5Yt5XnlgYVlj7hcP0FKHM6hBtma9KPx+7js+6kwa 1Y40TuYcRbkjA08RGkPTiVT6iNDQrtGog4jF2eqrN/lkKyYlw75f6YZ3fopL2qjZeuY/ 3/aQ== X-Gm-Message-State: AOAM533qGBvJNrMVd8K4vpJpWvR+hJ9paef9GWhvPRv24GWo+5gML/gj 5ivd4D9ZJ55kRx7Bbki0qbo= X-Google-Smtp-Source: ABdhPJzV3NepvlJayozZPApthQ6XEgtEb3cw4DsgPDe9Ize4/G+NaZ/iZIC/HQBCIFwQFW2vJrHnFQ== X-Received: by 2002:a05:600c:2511:: with SMTP id d17mr22369073wma.127.1595252482930; Mon, 20 Jul 2020 06:41:22 -0700 (PDT) Received: from localhost (ip-37-188-169-187.eurotel.cz. [37.188.169.187]) by smtp.gmail.com with ESMTPSA id u15sm34168960wrm.64.2020.07.20.06.41.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 06:41:22 -0700 (PDT) Date: Mon, 20 Jul 2020 15:41:21 +0200 From: Michal Hocko To: Tetsuo Handa Cc: Yafang Shao , David Rientjes , Andrew Morton , Linux MM Subject: Re: [PATCH] mm, oom: show process exiting information in __oom_kill_process() Message-ID: <20200720134121.GG4074@dhcp22.suse.cz> References: <1595166795-27587-1-git-send-email-laoar.shao@gmail.com> <20200720071607.GA18535@dhcp22.suse.cz> <253332d9-9f8c-d472-0bf4-388b29ecfb96@i-love.sakura.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <253332d9-9f8c-d472-0bf4-388b29ecfb96@i-love.sakura.ne.jp> X-Rspamd-Queue-Id: 915BB18287F32 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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 Mon 20-07-20 20:06:17, Tetsuo Handa wrote: > On 2020/07/20 19:36, Yafang Shao wrote: > > On Mon, Jul 20, 2020 at 3:16 PM Michal Hocko wrote: > >> I do agree that a silent bail out is not the best thing to do. The above > >> message would be more useful if it also explained what the oom killer > >> does (or does not): > >> > >> "OOM victim %d (%s) is already exiting. Skip killing the task\n" > >> > > > > Sure. > > This path is rarely hit because find_lock_task_mm() in oom_badness() from > select_bad_process() in the next round of OOM killer will skip this task. Agreed! > Since we don't wake up the OOM reaper when hitting this path, unless __mmput() > for this task itself immediately reclaims memory and updates the statistics > counter, we just get two chunks of dump_header() messages and one OOM victim. > > Current synchronous printk() gives __mmput() some time for reclaiming memory > and updating the statistics counter. But when printk() becomes asynchronous, > there might be quite small time. People might wonder "why killed message > follows immediately after skipped killing message"... Wouldn't the skip > message confuse people? I would ask other way around. Wouldn't that give us a better clue that the first oom invocation and the back off was a suboptimal decision? If we learn about more of those, maybe we want to reconsider this heuristic and rather retry the victim selection instead. I do not really see how this message would be harmful TBH. -- Michal Hocko SUSE Labs