[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6951700d-b6c0-b9b7-6587-1823a9d8c63d@google.com>
Date: Sun, 11 Aug 2024 13:21:52 -0700 (PDT)
From: David Rientjes <rientjes@...gle.com>
To: Vlastimil Babka <vbabka@...e.cz>
cc: Axel Rasmussen <axelrasmussen@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Christoph Lameter <cl@...ux.com>, Hyeonggon Yoo <42.hyeyoo@...il.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>, Pekka Enberg <penberg@...nel.org>,
Roman Gushchin <roman.gushchin@...ux.dev>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [PATCH] mm, slub: print CPU id on slab OOM
On Sun, 11 Aug 2024, Vlastimil Babka wrote:
> > diff --git a/mm/slub.c b/mm/slub.c
> > index c9d8a2497fd6..7148047998de 100644
> > --- a/mm/slub.c
> > +++ b/mm/slub.c
> > @@ -3422,7 +3422,8 @@ slab_out_of_memory(struct kmem_cache *s, gfp_t gfpflags, int nid)
> > if ((gfpflags & __GFP_NOWARN) || !__ratelimit(&slub_oom_rs))
> > return;
> >
> > - pr_warn("SLUB: Unable to allocate memory on node %d, gfp=%#x(%pGg)\n",
> > + pr_warn("SLUB: Unable to allocate memory for CPU %u on node %d, gfp=%#x(%pGg)\n",
>
> BTW, wouldn't "on CPU" be more correct, as "for CPU" might be misleading
> that we are somehow constrained to that CPU?
>
Agreed.
When I suggested this patch, I was trying to ascertain whether something
was really wonky based on some logs that we were seeing.
node 0: slabs: 223, objs: 11819, free: 0
node 1: slabs: 951, objs: 50262, free: 218
This is for a NUMA_NO_NODE allocation, so I wanted to know if the cpu was
on node 0 or node 1.
Even with the patch, that requires knowing the cpu-to-node mapping. If we
add the CPU output here, we likely also want to print out cpu_to_node().
> > + preemptible() ? raw_smp_processor_id() : smp_processor_id(),
>
> Also could we just use raw_smp_processor_id() always here? I don't see
> this has any advantage or am I missing something?
>
This matches my understanding as well.
Powered by blists - more mailing lists