Re: [PATCH v2 7/9] sched: define TIF_ALLOW_RESCHED

Thomas Gleixner
2023-09-21T00:14:08Z

On Wed, Sep 20 2023 at 22:51, Thomas Gleixner wrote:
> On Wed, Sep 20 2023 at 07:22, Ankur Arora wrote:
>
> The preempt count folding is an optimization which simplifies the
> preempt_enable logic:
>
> if (--preempt_count && need_resched())
> schedule()
> to
> if (--preempt_count)
> schedule()

That should be (!(--preempt_count... in both cases of course :)