[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bbb97e3c-e597-dd6e-e213-55bc1779d901@suse.cz>
Date: Fri, 29 Apr 2022 16:05:14 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: Hyeonggon Yoo <42.hyeyoo@...il.com>
Cc: Marco Elver <elver@...gle.com>,
Matthew WilCox <willy@...radead.org>,
Christoph Lameter <cl@...ux.com>,
Pekka Enberg <penberg@...nel.org>,
David Rientjes <rientjes@...gle.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
Roman Gushchin <roman.gushchin@...ux.dev>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 14/23] mm/slab_common: print cache name in tracepoints
On 4/14/22 10:57, Hyeonggon Yoo wrote:
> Print cache name in tracepoints. If there is no corresponding cache
> (kmalloc in SLOB or kmalloc_large_node), use KMALLOC_{,LARGE_}NAME
> macro.
>
> Signed-off-by: Hyeonggon Yoo <42.hyeyoo@...il.com>
Regarding tracepoints, I'm not sure it's a good idea to unify kmalloc and
kmem_cache_alloc. I think the common use case is to trace kmalloc as there
are many different callers, and then I'm not interested in kmem_cache_alloc
callers much.
What I would suggest instead is:
- drop the _node versions, add node to normal versions
- drop the kmem_alloc EVENT_CLASS, as kmalloc is different enough from
kmem_cache_alloc (see next points), define separately as TRACE_EVENT().
- printing cache_name makes sense to add for kmem_cache_alloc (also allows
filtering events) but not for kmalloc.
- kmem_cache_alloc with name can then drop the bytes_req, bytes_alloc as
they are fixed for given name (and can be read from slabinfo).
Not using a common tracepoint will prevent some later unifications/cleanup
(patch 21?), but hopefully not too much?
Powered by blists - more mailing lists