Re: [PATCH 2/3] tracing: Record task flag NEED_RESCHED_LAZY.
From: Ankur Arora
Date: Wed Oct 09 2024 - 14:50:48 EST
Steven Rostedt <rostedt@xxxxxxxxxxx> writes:
> On Wed, 09 Oct 2024 10:30:28 -0700
> Ankur Arora <ankur.a.arora@xxxxxxxxxx> wrote:
>
>> > +++ b/kernel/trace/trace.c
>> > @@ -2544,6 +2544,8 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status)
>> > trace_flags |= TRACE_FLAG_NEED_RESCHED;
>> > if (test_preempt_need_resched())
>> > trace_flags |= TRACE_FLAG_PREEMPT_RESCHED;
>> > + if (tif_test_bit(TIF_NEED_RESCHED_LAZY))
>>
>> TIF_NEED_RESCHED_LAZY falls back to TIF_NEED_RESCHED without
>> CONFIG_ARCH_HAS_PREEMPT_LAZY. So, you might need to add an explicit
>> check for that as well.
>>
>> With that,
>> Reviewed-by: Ankur Arora <ankur.a.arora@xxxxxxxxxx>
>>
>> Ankur
>>
>
> So this should be:
>
> if (IS_ENABLED(CONFIG_ARCH_HAS_PREEMPT_LAZY) &&
> tif_test_bit(TIF_NEED_RESCHED_LAZY))
>
> ?
Yeah, exactly that.
--
ankur