[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <972B9853-0BCA-4790-B909-A4ABA3FCDDB4@oracle.com>
Date: Wed, 4 Jun 2025 17:10:09 +0000
From: Prakash Sangappa <prakash.sangappa@...cle.com>
To: Steven Rostedt <rostedt@...dmis.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"peterz@...radead.org" <peterz@...radead.org>,
"mathieu.desnoyers@...icios.com" <mathieu.desnoyers@...icios.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"bigeasy@...utronix.de"
<bigeasy@...utronix.de>,
"kprateek.nayak@....com" <kprateek.nayak@....com>,
"vineethr@...ux.ibm.com" <vineethr@...ux.ibm.com>
Subject: Re: [PATCH V5 5/6] Sched: Add tracepoint for sched time slice
extension
> On Jun 4, 2025, at 7:36 AM, Steven Rostedt <rostedt@...dmis.org> wrote:
>
> On Tue, 3 Jun 2025 23:36:53 +0000
> Prakash Sangappa <prakash.sangappa@...cle.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);
> ),
Ok, will make that change.
Thanks
-Prakash
>
>
> -- Steve
Powered by blists - more mailing lists