Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3646892pxj; Tue, 15 Jun 2021 05:44:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpNwmoLxXOzMC4briwqUDNCVAWTNMstuSOJGz645tc4fe1zY68tcDyJB3lKLVWy5JHLbvP X-Received: by 2002:a05:6638:140c:: with SMTP id k12mr22293959jad.126.1623761070221; Tue, 15 Jun 2021 05:44:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623761070; cv=none; d=google.com; s=arc-20160816; b=GTIn0fNdCg5ogf98fSkWoOFT7L45lIPyRBY5x8i+R1npH/swffrLNdgshGosTHJ0gD jAfsr02TUkAMtptyUtbKdLXIU/Uh9XhrQ8/9LihCdayf1JsmFvjcArR3EwwMLj0V7Hkj SU1Df/y0Z9+lJpgyRLRLX7cMF14xBISDnK+T20Yfs4Fv8f+JmjR8s5pKB4HYmkKUK+lt rNMrs7vfApE38ihCemOhq4NiDrs1thLXODEqxeW7uYvmnL00Yqf1UM159f9JyCHRmzyj WzcWPVAwzAbp4efdKvPSFw8gjsZYqn0RhBNHUuWscX7U2RQ85gtI/8eLRzmAtTL+E06Z pCPw== 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=kELEEW1qxH+m+4Qkk9qF9CMOJ122ywI9/XKYVjKrTEg=; b=bUlxHHnV4YyZDcbACgbv+tPomUvz1EtzliL5ekGBkB6RQE+yUo8L7CLsOVCFKrloA9 xIE76pxP6zh3BY9b7pKxaiqB7P18DLFnEXdfdZZizmg/CHW5D4lEL8YpyGGgOLnc+X7i JIa0KL1QbYZZka3IoCS1Adyi6lMDJgSBermuAfJsS5bN2WVt8yuuVl7Hs7rwfPX1iyZs gqS9gqU5QzJfDrdZLC4yzcY/T13tfa01n4JPV3lpmDprCaZfI+JfHAzasz8C22q9OWcl EH5815aNzj0rtCLqejNtjOocKIPOFjkNkQ9eHZk0zCIQbc3RcHzXO6Sjlvex/+XhK7Rt 7CpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=c3wl8qqy; 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 j10si18198630iom.77.2021.06.15.05.44.17; Tue, 15 Jun 2021 05:44:30 -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=c3wl8qqy; 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 S230167AbhFOMow (ORCPT + 99 others); Tue, 15 Jun 2021 08:44:52 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:45472 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230081AbhFOMov (ORCPT ); Tue, 15 Jun 2021 08:44:51 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id AF15E2196D; Tue, 15 Jun 2021 12:42:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1623760966; 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=kELEEW1qxH+m+4Qkk9qF9CMOJ122ywI9/XKYVjKrTEg=; b=c3wl8qqyIzbHlNZr5z7xQeShk/RlgWnN3E49KpRGUYDTYDerKY3Vm4d4cu/tQcKyC1WslA cLIV5xfr7MrBDKGm0/Ga2nJ0S52p/Z80i3LMBiTy0V7rY9gmP6uuvBS5BshqFdm36CFsyr iRC2H7OK+z7hNExX0czxrgMpVnTYMcg= 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 340E8A3B89; Tue, 15 Jun 2021 12:42:46 +0000 (UTC) Date: Tue, 15 Jun 2021 14:42:35 +0200 From: Michal Hocko To: Aaron Tomlin Cc: linux-mm@kvack.org, akpm@linux-foundation.org, vbabka@suse.cz, penguin-kernel@i-love.sakura.ne.jp, llong@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mm/oom_kill: show oom eligibility when displaying the current memory state of all tasks Message-ID: References: <20210612204634.1102472-1-atomlin@redhat.com> <20210615115147.gp3w5bcjoaarvyse@ava.usersys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210615115147.gp3w5bcjoaarvyse@ava.usersys.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 15-06-21 12:51:47, Aaron Tomlin wrote: > On Mon 2021-06-14 08:44 +0200, Michal Hocko wrote: > > Well, I have to say that I have a bit hard time understand the problem > > statement here. First of all you are very likely basing your observation > > on an old kernel which is missing a fix which should make the situation > > impossible IIRC. You should be focusing on a justification why the new > > information is helpful for the current tree. > > Michal, > > Not exactly. > > See oom_reap_task(). Let's assume an OOM event occurred within the context > of a memcg and 'memory.oom.group' was not set. If I understand correctly, > once all attempts to OOM reap the specified task were "unsuccessful" then > MMF_OOM_SKIP is applied; and, the assumption is it will be terminated > shorty due to the pending fatal signal (see __oom_kill_process()) i.e. a > SIGKILL is sent to the "victim" before the OOM reaper is notified. Now > assuming the above task did not exited yet, another task, in the same > memcg, could also trigger an OOM event. Therefore, when showing potential > OOM victims the task above with MMF_OOM_SKIP set, will indeed be displayed. > > I understanding the point on OOM_SCORE_ADJ_MIN. This can be easily > identified and is clear to the viewer. However, the same cannot be stated > for MMF_OOM_SKIP. This is all true but it is not really clear why that is really a problem. Kernel log already contains information about reaped processes as they are reported to the log. I fully acknowledge that this is rather spartan but on the other hand from years of experience reading oom reports I have to say the dump_tasks is the least interesting part of the report (while being the most verbose one). All that being said, I am not really opposing extending the information although I am a bit worried about leaking too much internal state to the log. What I am asking for here is a justification why this addition is a general improvement and how it helps uderstanding oom reports further. So please focus on that part. -- Michal Hocko SUSE Labs