[Intel-gfx] [patch 00/13] preempt: Make preempt count unconditional
Linus Torvalds
torvalds at linux-foundation.org
Mon Sep 14 20:59:15 UTC 2020
On Mon, Sep 14, 2020 at 1:45 PM Thomas Gleixner <tglx at linutronix.de> wrote:
>
> Recently merged code does:
>
> gfp = preemptible() ? GFP_KERNEL : GFP_ATOMIC;
>
> Looks obviously correct, except for the fact that preemptible() is
> unconditionally false for CONFIF_PREEMPT_COUNT=n, i.e. all allocations in
> that code use GFP_ATOMIC on such kernels.
I don't think this is a good reason to entirely get rid of the no-preempt thing.
The above is just garbage. It's bogus. You can't do it.
Blaming the no-preempt code for this bug is extremely unfair, imho.
And the no-preempt code does help make for much better code generation
for simple spinlocks.
Where is that horribly buggy recent code? It's not in that exact
format, certainly, since 'grep' doesn't find it.
Linus
More information about the Intel-gfx
mailing list