On Mon, 13 Dec 2021 11:45:59 +0100 Sebastian Andrzej Siewior wrote:
On 2021-12-10 20:32:56 [-0800], Jakub Kicinski wrote:
quoted
On Fri, 10 Dec 2021 16:41:44 +0100 Sebastian Andrzej Siewior wrote:
quoted
- contended = qdisc_is_running(q);
+ if (!IS_ENABLED(CONFIG_PREEMPT_RT))
+ contended = qdisc_is_running(q);
+ else
+ contended = true;
Why not:
contended = qdisc_is_running(q) || IS_ENABLED(CONFIG_PREEMPT_RT);
I could do that. But I would swap the two arguments so that the
IS_ENABLED macro comes first and if true qdisc_is_running() is optimized
away.
FWIW I disagree. My version was more readable. The sprinkling of the
PREEMPT_RT tosh is getting a little annoying. Trying to regress the
clarity of the code should be top of mind here.