From: Steven Rostedt <rostedt@goodmis.org>
To: Prakash Sangappa <prakash.sangappa@oracle.com>
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org,
mathieu.desnoyers@efficios.com, tglx@linutronix.de,
bigeasy@linutronix.de, kprateek.nayak@amd.com,
vineethr@linux.ibm.com
Subject: Re: [PATCH V5 5/6] Sched: Add tracepoint for sched time slice extension
Date: Wed, 4 Jun 2025 10:36:44 -0400 [thread overview]
Message-ID: <20250604103644.4b41b9a3@gandalf.local.home> (raw)
In-Reply-To: <20250603233654.1838967-6-prakash.sangappa@oracle.com>
On Tue, 3 Jun 2025 23:36:53 +0000
Prakash Sangappa <prakash.sangappa@oracle.com> wrote:
> @@ -134,6 +138,10 @@ __always_inline unsigned long exit_to_user_mode_loop(struct pt_regs *regs,
> ti_work = read_thread_flags();
> }
>
> + if (ti_work_cleared)
> + trace_sched_delay_resched(current, ti_work_cleared &
> + (_TIF_NEED_RESCHED | _TIF_NEED_RESCHED_LAZY));
> +
Please make the above into a conditional tracepoint and you can also just
pass in ti_work_cleared. No reason to do that outside the tracepoint. As
the above is always checked regardless if tracing is enabled or not.
TRACE_EVENT_CONDITION(sched_delay_resched,
TP_PROTO(struct task_struct *p, unsigned int ti_work_cleared),
TP_ARGS(p, ti_work_cleared),
TP_CONDITION(ti_work_cleared),
TP_STRUCT__entry(
__array( char, comm, TASK_COMM_LEN )
__field( pid_t, pid )
__field( int, cpu )
__field( int, flg )
),
TP_fast_assign(
memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
__entry->pid = p->pid;
__entry->cpu = task_cpu(p);
__entry->flg = ti_work_cleared & (_TIF_NEED_RESCHED | _TIF_NEED_RESCHED_LAZY);
),
-- Steve
next prev parent reply other threads:[~2025-06-04 14:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-03 23:36 [PATCH V5 0/6] Scheduler " Prakash Sangappa
2025-06-03 23:36 ` [PATCH V5 1/6] Sched: " Prakash Sangappa
2025-06-04 14:31 ` Steven Rostedt
2025-06-04 14:54 ` Sebastian Andrzej Siewior
2025-06-04 17:29 ` Prakash Sangappa
2025-06-04 19:23 ` Sebastian Andrzej Siewior
2025-06-09 20:55 ` Steven Rostedt
2025-06-09 21:33 ` Steven Rostedt
2025-06-10 16:31 ` Prakash Sangappa
2025-06-10 16:40 ` Steven Rostedt
2025-07-01 0:48 ` Prakash Sangappa
2025-06-09 21:52 ` Steven Rostedt
2025-06-09 22:06 ` Steven Rostedt
2025-06-10 15:40 ` Prakash Sangappa
2025-06-04 17:09 ` Prakash Sangappa
2025-06-03 23:36 ` [PATCH V5 2/6] Sched: Indicate if thread got rescheduled Prakash Sangappa
2025-06-03 23:36 ` [PATCH V5 3/6] Sched: Tunable to specify duration of time slice extension Prakash Sangappa
2025-06-03 23:36 ` [PATCH V5 4/6] Sched: Add scheduler stat for cpu " Prakash Sangappa
2025-06-03 23:36 ` [PATCH V5 5/6] Sched: Add tracepoint for sched " Prakash Sangappa
2025-06-04 14:36 ` Steven Rostedt [this message]
2025-06-04 17:10 ` Prakash Sangappa
2025-06-03 23:36 ` [PATCH V5 6/6] Add API to query supported rseq cs flags Prakash Sangappa
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=20250604103644.4b41b9a3@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=bigeasy@linutronix.de \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=peterz@infradead.org \
--cc=prakash.sangappa@oracle.com \
--cc=tglx@linutronix.de \
--cc=vineethr@linux.ibm.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
all inboxes | Powered by JetHome®