Re: [rfc patch] rt,nohz_full: fix nohz_full for PREEMPT_RT_FULL

From: Steven Rostedt
Date: Thu Mar 12 2015 - 23:03:36 EST


On Fri, 13 Mar 2015 03:13:15 +0100
Mike Galbraith <umgwanakikbuti@xxxxxxxxx> wrote:

> > > + int softirqd = IS_ENABLED(CONFIG_PREEMPT_RT_FULL);
> > > +
> > > + softirqd &= current == this_cpu_ksoftirqd();
> >
> > Ug, binary and logical ANDs should not be combined. Just looks nasty.
> > What about:
> >
> > softirqd = !!(IS_ENABLED(CONFIG_PREEMPT_RT_FULL) &&
> > current == this_cpu_ksoftirqd());
>
> My way looks prettier to me, but I seem to be the only who thinks so
> (this is not the first time it got a gripe), so I'll change it ;-)

I shouldn't have said it looks nasty. It actually does look pretty, in
an artistic kind of way. It's just not very comprehensible.

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/