All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vasily Averin <vvs@openvz.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	kernel@openvz.org, linux-kernel@vger.kernel.org,
	Ingo Molnar <mingo@redhat.com>,
	linux-mm@kvack.org, Shakeel Butt <shakeelb@google.com>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Vlastimil Babka <vbabka@suse.cz>,
	Matthew Wilcox <willy@infradead.org>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	David Rientjes <rientjes@google.com>,
	Pekka Enberg <penberg@kernel.org>,
	Christoph Lameter <cl@linux.com>, Michal Hocko <mhocko@suse.com>,
	Muchun Song <songmuchun@bytedance.com>
Subject: Re: [PATCH v4] tracing: add 'accounted' entry into output of allocation tracepoints
Date: Mon, 23 May 2022 07:03:36 +0300	[thread overview]
Message-ID: <100d8ba9-80e4-4ba8-0568-a77f0dbd4f78@openvz.org> (raw)
In-Reply-To: <20220522160943.5e5950e0@gandalf.local.home>

On 5/22/22 23:09, Steven Rostedt wrote:
> On Sun, 22 May 2022 07:33:08 +0300
> Vasily Averin <vvs@openvz.org> wrote:
> 
>>> slab_flags=SLAB_RECLAIM_ACCOUNT|SLAB_ACCOUNT|SLAB_STORE_USER
>>> instead of just printing 'accounted=true/false'. This patch is too
>>> specific to SLAB_ACCOUNT.  
>>
>> Any extra output degrades performance.
>> For my task it's not important to know SLAB flags, I just need to understand,
>> is current allocation accounted or not.
> 
> If you do save the flags in the event, you can report that on output with
> the __print_flags() macro:
> 
>  TP_fast_assign(
> 	[..]
> 	__entry->sflags = s ? s->flags;
> 	[..]
>  )
>  TP_printk("... slab_flags=%s ..",
> 	[..]
> 	__print_flags(sflags, "|",
> 		{ SLAB_CONSISTENCY_CHECKS, "CONSISTENCY_CHECKS" },
> 		{ SLAB_RED_ZONE, "RED_ZONE" },
> 		{ SLAB_POISON, "POISON" },
> 		{ SLAB_HWCACHE_ALIGN, "HWCACHE_ALIGN" },
> 		{ SLAB_CACHE_DMA, "CACHE_DMA" },
> 		{ SLAB_CACHE_DMA32, "CACHE_DMA32" },
> 		{ SLAB_STORE_USER, "STORE_USER" },
> 		{ SLAB_PANIC, "PANIC" }), ... )
> 
> 
> And you get the flag output looking nicely, and all the processing is done
> on the reader path.
> 
> That's if you find it useful at all.

Thank you for explanation!
Yes, we can do it however I really doubt that any other slab flags are of interest to anyone.

Btw. in this form slab flags array causes sparse warnings,
because SLAB_* are defined as bitwise slab_flags_t.
This should be translated to unsigned long similarly to gfp_t flags.

Thank you,
	Vasily Averin

  reply	other threads:[~2022-05-23  4:03 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-18  6:24 [PATCH v3] tracing: add 'accounted' entry into output of allocation tracepoints Vasily Averin
2022-05-18 15:09 ` Shakeel Butt
2022-05-18 15:45 ` Vasily Averin
2022-05-18 20:04 ` Steven Rostedt
2022-05-18 20:04   ` Steven Rostedt
2022-05-19 11:35   ` Vasily Averin
2022-05-19 11:35     ` Vasily Averin
2022-05-19 14:03     ` Steven Rostedt
2022-05-19 14:03       ` Steven Rostedt
2022-05-19 16:29       ` Vasily Averin
2022-05-19 16:29         ` Vasily Averin
2022-05-19 16:32         ` Steven Rostedt
2022-05-19 16:32           ` Steven Rostedt
2022-05-21 18:32           ` Vasily Averin
2022-05-21 18:32             ` Vasily Averin
2022-05-21 18:36             ` [PATCH v4] " Vasily Averin
2022-05-22  3:51               ` Hyeonggon Yoo
2022-05-22  4:33                 ` Vasily Averin
2022-05-22  5:19                   ` Hyeonggon Yoo
2022-05-22  5:42                     ` Shakeel Butt
2022-05-22 18:53                     ` Vasily Averin
2022-05-22 20:09                   ` Steven Rostedt
2022-05-23  4:03                     ` Vasily Averin [this message]
2022-05-23 13:12               ` Vlastimil Babka
2022-05-30  7:47                 ` [PATCH v5] " Vasily Averin
2022-05-30  8:25                   ` Muchun Song
2022-05-31 11:46                   ` Hyeonggon Yoo
2022-05-31 16:58                     ` Vasily Averin
2022-06-03  3:21                       ` [PATCH mm v6] mm/tracing: " Vasily Averin
2022-06-03  3:21                         ` Vasily Averin
2022-06-15  9:41                         ` Vlastimil Babka
2022-06-15  9:41                           ` Vlastimil Babka
2022-05-25  1:34               ` [PATCH v4] tracing: " Roman Gushchin
2022-05-25  7:33               ` Hyeonggon Yoo
2022-05-25  8:24                 ` Vasily Averin

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=100d8ba9-80e4-4ba8-0568-a77f0dbd4f78@openvz.org \
    --to=vvs@openvz.org \
    --cc=42.hyeyoo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=kernel@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=mingo@redhat.com \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=rostedt@goodmis.org \
    --cc=shakeelb@google.com \
    --cc=songmuchun@bytedance.com \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.