On Tue, Sep 29, 2015 at 6:56 AM, Peter Zijlstra <pet...@infradead.org> wrote:
>
> + * Initial preempt_count value; reflects the preempt_count schedule invariant
> + * which states that during schedule preempt_count() == 2.

Is this actually *true*?

preempt_count() is two only if preemption is enabled. But spinlocks do
not actually update the preemption count if there is no preemption, so
these kinds of checks and comments that aren't even inside #ifdef
CONFIG_PREEMPT seem to be actively misleading.

I do believe that the preempt count is stable - but the actual value
would seem to depend on config options.

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

Reply via email to