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 1681FC433DF for ; Mon, 20 Jul 2020 14:27:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BA98B2065E for ; Mon, 20 Jul 2020 14:27:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA98B2065E 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 29F616B0006; Mon, 20 Jul 2020 10:27:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 227E86B0007; Mon, 20 Jul 2020 10:27:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0F01E6B0008; Mon, 20 Jul 2020 10:27:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0037.hostedemail.com [216.40.44.37]) by kanga.kvack.org (Postfix) with ESMTP id E9D2A6B0006 for ; Mon, 20 Jul 2020 10:27:04 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 82108184900F3 for ; Mon, 20 Jul 2020 14:27:04 +0000 (UTC) X-FDA: 77058681168.26.fowl22_190fd7026f25 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 3817818015490 for ; Mon, 20 Jul 2020 14:24:00 +0000 (UTC) X-HE-Tag: fowl22_190fd7026f25 X-Filterd-Recvd-Size: 4107 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Mon, 20 Jul 2020 14:23:59 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id 88so7782514wrh.3 for ; Mon, 20 Jul 2020 07:23:59 -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=UI+fHkQUMTaFJySR4D3P2BAtyhC07NeGhhFxmqVyjPY=; b=e4wJRWBodkAA3tM2fMZMX5kdBKYUnCDL4K2AR1eyg+A5eVhtDO5EX3gsqG+NHtACTa NmTLkFmyixtyV8Qyj/Kf2SDlSwJHu7ZArLMUKDNvRtpZeZS1cBhdXdZBURPN27CJXZ3N Uox4V9ArWAfOH1k+KNeOHzpH33IP/4m73rtHbo8KSAxZxhKe4kHvcVUDwJv9ZOUA3rq3 ouNIoXS/YEya72nbDkUcXXfsAjGHW8lwNBzrBv0XtugsUshe/MtmYQrw2ZCViNzU24HI Yg6twZt4eSclrKD/znPCK+//nqHHXw6Bkm88H1S3S2Nm9IeGU4pkaTkdByFnB64pd4yo MLKw== X-Gm-Message-State: AOAM533ByyCyD1GzFcBqeefBXzXmbNs38RpQilAp/iUkbONIaFG1mkXO R2+qa9tty8I9uNZnAT7hKu3dLnad X-Google-Smtp-Source: ABdhPJzDArbQRQJAf6BCc/F+mPLKHvm4r09baVYDBy6mFwQ6b8+pZ3M7mH0QvKMAtTDvZnzgvdP7HQ== X-Received: by 2002:adf:f64a:: with SMTP id x10mr13690730wrp.99.1595255038652; Mon, 20 Jul 2020 07:23:58 -0700 (PDT) Received: from localhost (ip-37-188-169-187.eurotel.cz. [37.188.169.187]) by smtp.gmail.com with ESMTPSA id z6sm30266438wmf.33.2020.07.20.07.23.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 07:23:57 -0700 (PDT) Date: Mon, 20 Jul 2020 16:23:56 +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: <20200720142356.GI4074@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> <20200720134121.GG4074@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 3817818015490 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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 23:03:46, Tetsuo Handa wrote: > On 2020/07/20 22:41, Michal Hocko wrote: > >> 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've just suggested > > Maybe the better behavior is to restart out_of_memory() without dump_header() > (we can remember whether we already called dump_header() into "struct oom_control"), > with last second watermark check before select_bad_process() and after dump_header(). > > at https://lkml.kernel.org/r/7f58363a-db1a-5502-e2b4-ee4b9fa31824@i-love.sakura.ne.jp . As soon as we learn about more of those as mentioned above. -- Michal Hocko SUSE Labs