From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 240AAC388F9 for ; Wed, 4 Nov 2020 07:18:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 98E7822206 for ; Wed, 4 Nov 2020 07:18:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="bisJcfYC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 98E7822206 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EDA846B0036; Wed, 4 Nov 2020 02:18:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E8B606B005D; Wed, 4 Nov 2020 02:18:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D527B6B0068; Wed, 4 Nov 2020 02:18:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0160.hostedemail.com [216.40.44.160]) by kanga.kvack.org (Postfix) with ESMTP id A72A36B0036 for ; Wed, 4 Nov 2020 02:18:31 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 4D226181AC9BF for ; Wed, 4 Nov 2020 07:18:31 +0000 (UTC) X-FDA: 77445882822.24.care54_2d119e5272bf Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 26BC41A4A0 for ; Wed, 4 Nov 2020 07:18:31 +0000 (UTC) X-HE-Tag: care54_2d119e5272bf X-Filterd-Recvd-Size: 3613 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Wed, 4 Nov 2020 07:18:30 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1604474309; h=from:from:reply-to:subject:subject: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=k+x5KwHlLohxp0Hlr5WDb5Law8fHA93CulDDqpCr6sM=; b=bisJcfYCgVZPvfi9lk2wCaGLnM2dpk6rGZl2paTg63tB0cQKo4RWbXVlxdG5uHEIzZs6S2 3NghJ/Qfj/3I/ru0CSSI1f6zB07DBJaSukMo0PFJPlmlw4Zab5MqPEZM3BYXz/W1p4mEfi Yw3NYvASG6cDCsppOpBYcIwUzOzGbms= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id ACE70AC65; Wed, 4 Nov 2020 07:18:29 +0000 (UTC) Date: Wed, 4 Nov 2020 08:18:28 +0100 From: Michal Hocko To: Feng Tang Cc: Andrew Morton , Johannes Weiner , Matthew Wilcox , Mel Gorman , dave.hansen@intel.com, ying.huang@intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 1/2] mm, oom: dump meminfo for all memory nodes Message-ID: <20201104071828.GO21990@dhcp22.suse.cz> References: <1604470210-124827-1-git-send-email-feng.tang@intel.com> <1604470210-124827-2-git-send-email-feng.tang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1604470210-124827-2-git-send-email-feng.tang@intel.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed 04-11-20 14:10:09, Feng Tang wrote: > In some OOM cases, if there is memory node binding(current->mems_allowed > is not NULL), system may only print the meminfo for these bound nodes, > while other nodes' info could still be important for debugging. > > For example on a platform with one normal node (has DMA/DMA32/NORMAL... > zones) and one node which only has movable zone (either for memory hotplug > case or a persistent memory node), some user will run docker while binding > memory to the movable node. many memory allocations originated from the > docker instance will fall back to the other node, and when a OOM happens, > meminfo for both nodes are needed. > > So extend the show_mem() to cover all memory nodes. I do not like this change. The reason why we print only relevant numa nodes is the size of the oom report. Also all other numa nodes are not really relevant to the allocation so there is no real reason to print their info. We used to do that in the past and decided that this is more than suboptimal. I do understand that this is a preliminary work for your later patch which tweaks the node binding and so more numa nodes are eligible but then I would propose to merge the two patches. > Signed-off-by: Feng Tang > --- > 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 8b84661..601476cc 100644 > --- a/mm/oom_kill.c > +++ b/mm/oom_kill.c > @@ -462,7 +462,7 @@ static void dump_header(struct oom_control *oc, struct task_struct *p) > if (is_memcg_oom(oc)) > mem_cgroup_print_oom_meminfo(oc->memcg); > else { > - show_mem(SHOW_MEM_FILTER_NODES, oc->nodemask); > + show_mem(SHOW_MEM_FILTER_NODES, &node_states[N_MEMORY]); > if (is_dump_unreclaim_slabs()) > dump_unreclaimable_slab(); > } > -- > 2.7.4 -- Michal Hocko SUSE Labs