Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2104911ybe; Tue, 3 Sep 2019 08:04:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqyweRniDOsGuOBdZbeAMtSL1vg//RUWihdP50VwOFORts/abnvU2jXehi3TwSLc5jhyBAjS X-Received: by 2002:a17:902:2f43:: with SMTP id s61mr34932136plb.22.1567523069078; Tue, 03 Sep 2019 08:04:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567523069; cv=none; d=google.com; s=arc-20160816; b=z78xyt255Dn6AU1+vl5xoIr2LCgv7BR7yflvZWOUsTjGxnH0HBaFtaBFRR1cZYrV2s JIFFcRTat1QHfDuReJYR/qxBuGGS0EbLmiu7BuC3dxldReLzCTwSI0L69aWIcuyUpjYX SLFf8/p5Eg30eCFMojEieiYA6lxTzeS9vOs8WJKMCt4tQpskVpH1o42XuLSBDPVukGLl mQowrBcT9KerPPxH6+Blapy85Rp5oEE8YYdjXX9aG1NXfmuhpkcNjKEruN39dM+f6BGH lOc/Uivk24DIzMICCceyfP+ucPP41nV78JvwHs6VDyJK1EElEgnJsSwdrIlGDY6H0q+m DGXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=98UJ89ZiZ75QQYhHn10zS32n71fYy3DwoNcRQRVS5xk=; b=uQvBP8GSKFGBLsNF/sN5PxhNwsl0ChzMs8FLEXw7BlxoZAbs5shR5jCFH4UCZoShf/ Fu1abNtvvPjUjDQFNgHA4g67kgXXyipnrTolSGWqaODNPLZe49x5BYkRCfycY0ukmUg1 IDklr1z/foKzR90VjSxH4t/b3pPUVh7BT7eGkdP3yLySdrV/yJ0Sc9OJeJ2cf9gOXMeP sclUa3C+r+ZCtKcRS+4KlFxaFEPJ51l0l9yQf9RPY9QD0B5Kxj3HRr1IrZyfQx1Q2Eds uSx6Rhmu/c/JxN37yylAMMeKT4Fa1H0qlfp+n276CewXGajP+3SNxZ9+q7rLNRGofo0j DqSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b="Y0dYwB/x"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u3si15010247plq.143.2019.09.03.08.04.06; Tue, 03 Sep 2019 08:04:29 -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; dkim=pass header.i=@lca.pw header.s=google header.b="Y0dYwB/x"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729540AbfICPCt (ORCPT + 99 others); Tue, 3 Sep 2019 11:02:49 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:33564 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727005AbfICPCt (ORCPT ); Tue, 3 Sep 2019 11:02:49 -0400 Received: by mail-qt1-f193.google.com with SMTP id r5so15047818qtd.0 for ; Tue, 03 Sep 2019 08:02:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=98UJ89ZiZ75QQYhHn10zS32n71fYy3DwoNcRQRVS5xk=; b=Y0dYwB/xEIg2VC6kphV8moKQMLXSqjyrxIDvPmAgzYa7jRAFu+rhArsFpgpxNorwxF gHTeIuv/iD4Osf2V9qXXedGunN+ouk+dYxB/wokeKoDvPfNrjfb1JlTrJ2lG+Iu2xoe8 JAbKHDYsO+QD2AGmQ2Q0w+50if55VPTX6DUbkWsl7ddh3kYlzHhS70XKbYo+sutA8I3H LEJJiwbr0XaAYu5yLRW4Jtm0uQBwIfiDkSBfI4x0S/BRs0uUDHQ0ARjWz59xZLqbkBPf J+hyZOZ41bFrhG7YcJvCAOxiTz+SvDl87P2/LOc+17Xg84onz/vXt6zb68kOdAIN4K0V LRzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=98UJ89ZiZ75QQYhHn10zS32n71fYy3DwoNcRQRVS5xk=; b=Qa2Y5fYb3i/dm18M0I1S5NeAxmiEeseTCO8eRIdKDBfPi58tu4YuhONqeR4jZKB1Ad U5zzAukW6Q+9U0DG293aGZkNpSJjzPc274JkW8mg6jfunZ8ZNljn7IaS5EMtJ0XVht9i qpQGxgyxbcDGEHJHQupn5hk0jx9l0YIZAy5Tj3v3f1Fy8Qeb6J2+g9abQBF6/uH9oQ44 m2WBgZrQ5+HPU6xELD5NTgX0PwcVC3Vre8hFikFA9vpc3hLqjDA5TrgpZEgsPXdEtncr IJVT8cVEf0C/WthlwZTzAI59vOdDYg0K7PqUE5IDC77DVF6iSl0CEZRHON6eK8FG3J3K tN5g== X-Gm-Message-State: APjAAAWYCZ9gQ4h1FYXCdoG2uPaQepTpTRdyJn4ZFFXQgf7hF8xGjaKK 5JScZNlAQvkCdsEXTVwpzBiNcA== X-Received: by 2002:ac8:6a0a:: with SMTP id t10mr19414483qtr.0.1567522968447; Tue, 03 Sep 2019 08:02:48 -0700 (PDT) Received: from dhcp-41-57.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id z5sm98214qki.55.2019.09.03.08.02.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Sep 2019 08:02:47 -0700 (PDT) Message-ID: <1567522966.5576.51.camel@lca.pw> Subject: Re: [RFC PATCH] mm, oom: disable dump_tasks by default From: Qian Cai To: Michal Hocko , linux-mm@kvack.org Cc: Andrew Morton , Tetsuo Handa , David Rientjes , LKML , Michal Hocko Date: Tue, 03 Sep 2019 11:02:46 -0400 In-Reply-To: <20190903144512.9374-1-mhocko@kernel.org> References: <20190903144512.9374-1-mhocko@kernel.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6 (3.22.6-10.el7) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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. > > 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. > > Therefore change the default of oom_dump_tasks to not print the task > list by default. The sysctl remains in place for anybody who might need > to get this additional information. The oom report still provides an > information about the allocation context and the state of the MM > subsystem which should be sufficient to analyse most of the oom > situations. > > Signed-off-by: Michal Hocko > --- >  mm/oom_kill.c | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/oom_kill.c b/mm/oom_kill.c > index eda2e2a0bdc6..d0353705c6e6 100644 > --- a/mm/oom_kill.c > +++ b/mm/oom_kill.c > @@ -52,7 +52,7 @@ >   >  int sysctl_panic_on_oom; >  int sysctl_oom_kill_allocating_task; > -int sysctl_oom_dump_tasks = 1; > +int sysctl_oom_dump_tasks; >   >  /* >   * Serializes oom killer invocations (out_of_memory()) from all contexts to