Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2216424pxy; Tue, 3 Aug 2021 00:07:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzahSoYVlGyUtZClgEeBKQ5IbsUOXjHsSQS1cuZeXPFkjDtlLywyBvWeLk77HWv6cnJ4s1i X-Received: by 2002:a5e:c803:: with SMTP id y3mr191820iol.107.1627974448351; Tue, 03 Aug 2021 00:07:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627974448; cv=none; d=google.com; s=arc-20160816; b=Km+2UZeU1PvARItT20tHFGZjZmcAEX0gt02nruHJm5GNKZdUZN35U3O36AMMy4afjo 5L1VZ/NB9BFamZgMgOH3stCiB+pgExqb3zaxYGPnsCdUIF+xscTdOdSCPHUWUhgEQjMo ZXPKzQy9XOCnMpSi5nkcNNbDSPpIlQk0Wo5RgFE37ktETxEa5vVUqZGfCY8Z/Pu77PE9 8CLZEKE9iXcaxlKSRXsER2fagmchHTFdNPe+3IhR80+U8RZtiAUHMIcALf7yWphlM3wP adrLyi9l+/pzGevTSM4JB7/rbM8IeAkYFUweYM3zlRWwd5y9DX7jg/+t+7gI7qiOlnKW ZfNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=HXoSXB6BHd2s7Z7Nu01Vf6RqwUphqbW5sKmtUSQV2Do=; b=UiTzj7yEtT7d2nBeExRsiNpUCkkL6XVLUIKL8v7lVL2swxmYw9EGRWS3JGMgj4FPKs jy02erKgjM4PBMoq8eUA3TcVmWVSADFRjhyRtF6tl7z8xt5sTCPXbeU6YQFpd8fc4EPE sq5Y2YNfnLoTXO42qBS9MFI1icCINUiJBg/upQgzCTEL5RvPuGZcBdn0H+XzN569US6b t8Cim7dFnImk8amtz+NXn0XgFpnAzCtVI91MYp2BhOeSBEVKVo/tL5NQbB0JlyYgAqK6 PBQJHsS1V7DjyxS0Q8iWmO+UfKfbPO+AfcXY2Zm91q7XzmE2xSR8vVZsIJjIpmSP6fh8 tP6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="Ja/yJ8np"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si16795592jat.88.2021.08.03.00.07.14; Tue, 03 Aug 2021 00:07:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="Ja/yJ8np"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234010AbhHCHGM (ORCPT + 99 others); Tue, 3 Aug 2021 03:06:12 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:60686 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233677AbhHCHGL (ORCPT ); Tue, 3 Aug 2021 03:06:11 -0400 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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