Linux Trace Kernel
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Kyuwon Cho" <kyuwon.cho@skku.edu>
Cc: linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing: scope named triggers to a trace instance
Date: Thu, 03 Dec 2026 18:12:29 +0000	[thread overview]
Message-ID: <sashiko-outbox-248354@kernel.org> (raw)
In-Reply-To: <179620737571.2194197.4278377734144085291@skku.edu>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] tracing: cold tr field pushes list.next to second cacheline
--

commit 691921d27308db5056e717b3e5eb378c3c9b791e
Author: Kyuwon Cho <kyuwon.cho@skku.edu>

tracing: scope named triggers to a trace instance

This commit records the owning trace_array on struct event_trigger_data and
checks it during named-trigger lookup and pause operations so named histogram
triggers are only shared within the same trace instance.

> diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
> index ff08474d6e798..67e904b8bc033 100644
> --- a/kernel/trace/trace.h
> +++ b/kernel/trace/trace.h
> @@ -1935,6 +1935,7 @@ struct event_trigger_data {
>  	struct event_filter __rcu	*filter;
>  	char				*filter_str;
>  	void				*private_data;
> +	struct trace_array		*tr;
>  	bool				paused;
>  	bool				paused_tmp;
>  	struct list_head		list;

[Severity: Low]
Does placing tr here push list.next into a second cacheline on 64-bit
kernels?

struct event_trigger_data comes from kmalloc-128, so inserting tr before
paused moves list.next from offset 56 to 64.  event_triggers_call() and
event_triggers_post_call() only read earlier fields plus list.next, so each
active trigger now loads two cachelines instead of one per event.

Since tr is only used under event_mutex on the control path, placing it
after list alongside the other named-trigger fields (name, named_list,
named_data) keeps list.next in the first cacheline with the same 128-byte
struct size.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/179620737571.2194197.4278377734144085291@skku.edu?part=1

      reply	other threads:[~2026-12-03 18:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 16:55 [PATCH] tracing: scope named triggers to a trace instance Kyuwon Cho
2026-12-03 18:12 ` sashiko-bot [this message]

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=sashiko-outbox-248354@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=kyuwon.cho@skku.edu \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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