Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp7321693ybh; Thu, 8 Aug 2019 13:46:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwcKyGd+MmoT1YDNpw+qX33dYPSCD3v0B8CLAJ/5fF1LCsZAd7RNX4X00WycY3WnAUHmCQp X-Received: by 2002:aa7:9359:: with SMTP id 25mr17026603pfn.261.1565297209310; Thu, 08 Aug 2019 13:46:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565297209; cv=none; d=google.com; s=arc-20160816; b=nZh10xdtwIb11vQH00awzfmb3ZEgWoT4AyHqd/YKIEABypiF538k/RWd9+W5U9rDwN pkbJau1BuG5WvUJFsfER47yNxF75TQVjULBNU/VPaGvs4Pigx8MelL3HyMfv221nvGj3 WgBnjFBV1EFb8eL+UPHtqISzwZsmQ1N34lxk0Gcci87ZeBgXYr77x+ImrYiXFR16BemH voq9K3OWP0ca8GyVXyf1ttHV3mQ7RpTR8Jh6dpwyKqE06YFxTUf+2uU2SgUaFohYMnsD Bp008wStslZqNbJdzdW9uPpOeWwdyiQZaBvrDLxr0ztTmSknACQQE0eLO3JQ+BZnYRu6 l2BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=I8XsaFXf8iQlq8E+z7qOR+Ik+xepl7WhVzVrX1wGvAk=; b=WxkNSn593Rmx46l6E17J27BsOICjZyKgtfzNZLpOU+7wliziC/zkVt9/MP6kG/NOpD Yg17KJYE7553d4GJcMxUqawbsgC9F29tg74isXBXERmttoDb0Iz8/npLiJ9KXGyNRTFw V/pzYqDCphqpf6enMeo08UuxlhXipxX1Tii7KrbI6+l/k+edExREYeJg8unx898UhTqU VCzCX7FArMgdM8mmvI3T0Am1FrBu+SWbSljCtHMjDQIFASBW109jVEXZ4jCU5jpOVgcw yO63ij2/eHoQKXMB+dnRzj/D2896PCCvGcqIcKLL52Ot6O8ZOIZWRna9aJdFqJS/ynqi 4vMQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y15si55876636pfb.28.2019.08.08.13.46.32; Thu, 08 Aug 2019 13:46:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390287AbfHHUHS (ORCPT + 99 others); Thu, 8 Aug 2019 16:07:18 -0400 Received: from mx2.suse.de ([195.135.220.15]:36800 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2390169AbfHHUHR (ORCPT ); Thu, 8 Aug 2019 16:07:17 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 83B03AD2A; Thu, 8 Aug 2019 20:07:16 +0000 (UTC) Date: Thu, 8 Aug 2019 22:07:15 +0200 From: Michal Hocko To: Edward Chron Cc: Andrew Morton , Roman Gushchin , Johannes Weiner , David Rientjes , Tetsuo Handa , Shakeel Butt , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Ivan Delalande Subject: Re: [PATCH] mm/oom: Add killed process selection information Message-ID: <20190808200715.GI18351@dhcp22.suse.cz> References: <20190808183247.28206-1-echron@arista.com> <20190808185119.GF18351@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [please do not top-post] On Thu 08-08-19 12:21:30, Edward Chron wrote: > It is helpful to the admin that looks at the kill message and records this > information. OOMs can come in bunches. > Knowing how much resource the oom selected process was using at the time of > the OOM event is very useful, these fields document key process and system > memory/swap values and can be quite helpful. I do agree and we already print that information. rss with a break down to anonymous, file backed and shmem, is usually a large part of the oom victims foot print. It is not a complete information because there might be a lot of memory hidden by other resource (open files etc.). We do not print that information because it is not considered in the oom selection. It is also not guaranteed to be freed upon the task exit. > Also can't you disable printing the oom eligible task list? For systems > with very large numbers of oom eligible processes that would seem to be > very desirable. Yes that is indeed the case. But how does the oom_score and oom_score_adj alone without comparing it to other eligible tasks help in isolation? [...] > I'm not sure that change would be supported upstream but again in our > experience we've found it helpful, since you asked. Could you be more specific about how that information is useful except for recording it? I am all for giving an useful information in the OOM report but I would like to hear a sound justification for each additional piece of information. E.g. this helped us to understand why the task has been selected - this is usually dump_tasks portion of the report because it gives a picture of what the OOM killer sees when choosing who to kill. Then we have the summary to give us an estimation on how much memory will get freed when the victim dies - rss is a very rough estimation. But is a portion of the overal memory or oom_score{_adj} important to print as well? Those are relative values. Say you get memory-usage:10%, oom_score:42 and oom_score_adj:0. What are you going to tell from that information? -- Michal Hocko SUSE Labs