Re: [PATCH 2/3] tracing: Use in_serving_softirq() to deduct softirq status.

From: Steven Rostedt
Date: Fri Jan 22 2021 - 17:12:36 EST


On Wed, 13 Jan 2021 00:00:56 +0100
Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> wrote:

> Use in_serving_softirq() macro which works on PREEMPT_RT. On !PREEMPT_RT
> the compiler (gcc-10 / clang-11) is smart enough to optimize the
> in_serving_softirq() related read of the preemption counter away.
> The only difference I noticed by using in_serving_softirq() on
> !PREEMPT_RT is that gcc-10 implemented tracing_gen_ctx_flags() as
> reading FLAG, jmp _tracing_gen_ctx_flags(). Without in_serving_softirq()
> it inlined _tracing_gen_ctx_flags() into tracing_gen_ctx_flags().

If we inline it normally (as described in my first patch reply), there may
be no difference.

-- Steve