From: Michal Hocko <mhocko@suse.com>
To: Feng Tang <feng.tang@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Matthew Wilcox <willy@infradead.org>,
Mel Gorman <mgorman@suse.de>,
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
Date: Wed, 4 Nov 2020 08:18:28 +0100 [thread overview]
Message-ID: <20201104071828.GO21990@dhcp22.suse.cz> (raw)
In-Reply-To: <1604470210-124827-2-git-send-email-feng.tang@intel.com>
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 <feng.tang@intel.com>
> ---
> 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
next prev parent reply other threads:[~2020-11-04 7:18 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-04 6:10 [RFC PATCH 0/2] mm: fix OOMs for binding workloads to movable zone only node Feng Tang
2020-11-04 6:10 ` [RFC PATCH 1/2] mm, oom: dump meminfo for all memory nodes Feng Tang
2020-11-04 7:18 ` Michal Hocko [this message]
2020-11-04 6:10 ` [RFC PATCH 2/2] mm, page_alloc: loose the node binding check to avoid helpless oom killing Feng Tang
2020-11-04 7:23 ` Michal Hocko
2020-11-04 7:13 ` [RFC PATCH 0/2] mm: fix OOMs for binding workloads to movable zone only node Michal Hocko
2020-11-04 7:38 ` Feng Tang
2020-11-04 7:58 ` Michal Hocko
2020-11-04 8:40 ` Feng Tang
2020-11-04 8:53 ` Michal Hocko
2020-11-05 1:40 ` Feng Tang
2020-11-05 12:08 ` Michal Hocko
2020-11-05 12:53 ` Vlastimil Babka
2020-11-05 12:58 ` Michal Hocko
2020-11-05 13:07 ` Feng Tang
2020-11-05 13:12 ` Michal Hocko
2020-11-05 13:43 ` Feng Tang
2020-11-05 16:16 ` Michal Hocko
2020-11-06 7:06 ` Feng Tang
2020-11-06 8:10 ` Michal Hocko
2020-11-06 9:08 ` Feng Tang
2020-11-06 10:35 ` Michal Hocko
2020-11-05 13:14 ` Vlastimil Babka
2020-11-05 13:19 ` Michal Hocko
2020-11-05 13:34 ` Vlastimil Babka
2020-11-06 4:32 ` Huang, Ying
2020-11-06 7:43 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201104071828.GO21990@dhcp22.suse.cz \
--to=mhocko@suse.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@intel.com \
--cc=feng.tang@intel.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=willy@infradead.org \
--cc=ying.huang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).