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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 54A04C4338F for ; Tue, 3 Aug 2021 07:06:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D792B60EFF for ; Tue, 3 Aug 2021 07:06:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D792B60EFF Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 6EFA86B0033; Tue, 3 Aug 2021 03:06:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 69FD76B0036; Tue, 3 Aug 2021 03:06:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 58E528D0001; Tue, 3 Aug 2021 03:06:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0224.hostedemail.com [216.40.44.224]) by kanga.kvack.org (Postfix) with ESMTP id 4112E6B0033 for ; Tue, 3 Aug 2021 03:06:02 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id A9D7F181AEF23 for ; Tue, 3 Aug 2021 07:06:01 +0000 (UTC) X-FDA: 78432884922.21.CECEB1C Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf30.hostedemail.com (Postfix) with ESMTP id 2A228E002108 for ; Tue, 3 Aug 2021 07:06:01 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id C47C921DEB; Tue, 3 Aug 2021 07:05:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1627974359; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HXoSXB6BHd2s7Z7Nu01Vf6RqwUphqbW5sKmtUSQV2Do=; b=Ja/yJ8npNDs0v7SpPu7OzzCUszBh7T903Yyt+8EqKv2o/z7b/4+PO7UOISQrhGJ/wRo+x4 cXXEPU0ICaeucRezdCMumTcsDLF67mJrJCDIbCweya7oUFl7/dKlO7iUeqDyYAbD1el64m eIZFOY7UaGmvcIyXV2XXlOkM+tX5ZRk= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 68A84A3BCB; Tue, 3 Aug 2021 07:05:59 +0000 (UTC) Date: Tue, 3 Aug 2021 09:05:58 +0200 From: Michal Hocko To: Aaron Tomlin Cc: linux-mm@kvack.org, akpm@linux-foundation.org, penguin-kernel@i-love.sakura.ne.jp, rientjes@google.com, llong@redhat.com, neelx@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] mm/oom_kill: show oom eligibility when displaying the current memory state of all tasks Message-ID: References: <20210730162002.279678-1-atomlin@redhat.com> <20210802151250.lqn5fu5pioygsry6@ava.usersys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210802151250.lqn5fu5pioygsry6@ava.usersys.com> Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b="Ja/yJ8np"; spf=pass (imf30.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 2A228E002108 X-Stat-Signature: ggazfedzdgu5moqh8x6hi7tzrtqks6cx X-HE-Tag: 1627974361-40297 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 02-08-21 16:12:50, Aaron Tomlin wrote: > On Mon 2021-08-02 08:34 +0200, Michal Hocko wrote: > > If you really want/need to make any change here then I would propose to > > either add E(eligible)/I(ligible) column without any specifics or > > consistently skip over all tasks which are not eligible. > > How about the suggestion made by David i.e. exposing the value returned by > oom_badness(), as if I understand correctly, this would provide a more > complete picture with regard to the rationale used? There were some attempts to print oom_score during OOM. E.g. http://lkml.kernel.org/r/20190808183247.28206-1-echron@arista.com. That one was rejected on the grounds that the number on its own doesn't really present any real value. It is really only valuable when comparing to other potential oom victims. I have to say I am still worried about printing this internal scoring as it should have really been an implementation detail but with /proc//oom_score this is likely a lost battle and I am willing to give up on that front. I am still not entirely convinced this is worth doing though. oom_badness is not a cheap operation. task_lock has to be taken again during dump_tasks for each task so the already quite expensive operation will be more so. Is this really something we cannot live without? -- Michal Hocko SUSE Labs