Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2118336ybe; Tue, 3 Sep 2019 08:14:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqxfd/BFZexd1vaPUhqpJzrYEiF3otz9HBxdcjp3Pxayw5DQppzF5VEcHmBHfFZmesxXbf15 X-Received: by 2002:a17:902:441:: with SMTP id 59mr36532130ple.62.1567523665430; Tue, 03 Sep 2019 08:14:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567523665; cv=none; d=google.com; s=arc-20160816; b=AK3xx9ovVvNpEbqonW9DGH9NRuP19zNvgL+G2tqwJPFBDXepEqi72qYE8raF6MXgPR 7t52xwLBZj9GWE7zsEcWUiWQ8b0vj9H0kV8+3YvuLqI7OKXSPbPJBBDrzf9sRwWJvTG5 SXFlchjBu2HIugoBLHwDljkgco+drN/5XkUIc4wpLQECilunPD2D3opYN/7SE9paaaRt iI66xBnpIVQofP8Zwdy1I/O9uGWDh2pW9mZJG4bkL9mTHMFccOhtsyjBbJ3znwo/xMiH JsiV5kvWByHSfOgpwFq7Qvb4SFxaLMikkwGPMtPuawOF4FQYs9wp4Zg7HYOTx72LiaZO ku+w== 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=mq21/z3qmpDMplMrgyHrk5gKq0DiH+gY0GtD0awSwQM=; b=oQqjziHJcBNyrJxIVOeze2QTb6es0jXgMk63pHOah+NAExZy55QZUvSTFQu7oquhtS /QG4TskVvBjyM0zw/eqtT6243sReCNEciwSzURnsaT2tw5LiY46iUI/9vWqSxwEHUqo9 7bLv6sye/L9i3bO/SOlkNmLo33Bx/Ex9vlXW7AOyIpmpiNPVCrdTBeex2LWy5FK+5xTY jRGDJHRir7x3DL5OmW56K95bOiWU+ld0+km+FRn3LnYID3o6+Ncp8I3xHKqJ37qU/dvC 78/hLZvaewkkbY3carkhqjfr/CIOmQHwCMss8/z4elytwwkac6/IOgzYsej0kSmyaZP+ 1ODw== 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 k4si11380293pgg.496.2019.09.03.08.14.09; Tue, 03 Sep 2019 08:14:25 -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 S1729451AbfICPNJ (ORCPT + 99 others); Tue, 3 Sep 2019 11:13:09 -0400 Received: from mx2.suse.de ([195.135.220.15]:37158 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727667AbfICPNI (ORCPT ); Tue, 3 Sep 2019 11:13:08 -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 952CDAFB7; Tue, 3 Sep 2019 15:13:07 +0000 (UTC) Date: Tue, 3 Sep 2019 17:13:07 +0200 From: Michal Hocko To: Qian Cai Cc: linux-mm@kvack.org, Andrew Morton , Tetsuo Handa , David Rientjes , LKML Subject: Re: [RFC PATCH] mm, oom: disable dump_tasks by default Message-ID: <20190903151307.GZ14028@dhcp22.suse.cz> References: <20190903144512.9374-1-mhocko@kernel.org> <1567522966.5576.51.camel@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1567522966.5576.51.camel@lca.pw> 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 On Tue 03-09-19 11:02:46, Qian Cai wrote: > On Tue, 2019-09-03 at 16:45 +0200, Michal Hocko wrote: > > From: Michal Hocko > > > > dump_tasks has been introduced by quite some time ago fef1bdd68c81 > > ("oom: add sysctl to enable task memory dump"). It's primary purpose is > > to help analyse oom victim selection decision. This has been certainly > > useful at times when the heuristic to chose a victim was much more > > volatile. Since a63d83f427fb ("oom: badness heuristic rewrite") > > situation became much more stable (mostly because the only selection > > criterion is the memory usage) and reports about a wrong process to > > be shot down have become effectively non-existent. > > Well, I still see OOM sometimes kills wrong processes like ssh, systemd > processes while LTP OOM tests with staight-forward allocation patterns. Please report those. Most cases I have seen so far just turned out to work as expected and memory hogs just used oom_score_adj or similar. > I just > have not had a chance to debug them fully. The situation could be worse with > more complex allocations like random stress or fuzzy testing. Nothing really prevents enabling the sysctl when doing OOM oriented testing. > > dump_tasks can generate a lot of output to the kernel log. It is not > > uncommon that even relative small system has hundreds of tasks running. > > Generating a lot of output to the kernel log both makes the oom report > > less convenient to process and also induces a higher load on the printk > > subsystem which can lead to other problems (e.g. longer stalls to flush > > all the data to consoles). > > It is only generate output for the victim process where I tested on those large > NUMA machines and the output is fairly manageable. The main question here is whether that information is useful by _default_ because it is certainly not free. It takes both time to crawl all processes and cpu cycles to get that information to the console because printk is not free either. So if it more of "nice to have" than necessary for oom analysis then it should be disabled by default IMHO. -- Michal Hocko SUSE Labs