Re: [PATCH 1/3] x86/mm/pat: Disable preemption around __flush_tlb_all()
From: Thomas Gleixner
Date: Wed Oct 17 2018 - 07:17:25 EST
On Wed, 17 Oct 2018, Peter Zijlstra wrote:
> On Wed, Oct 17, 2018 at 09:54:38AM +0000, David Laight wrote:
> > > * We should perform an IPI and flush all tlbs,
> > > * but that can deadlock->flush only current cpu:
> > > */
> > > + preempt_disable();
> > > __flush_tlb_all();
> > > + preempt_enable();
> >
> > Can it make any sense to flush the tlb with preemption enabled?
> > Surely preemption must be disabled over something else as well?
>
> This code is fishy anyway, for only doing that local invalidate.
>
> Ideally we'd never ever merge anything that only does local invalidates,
> on a global address space, that's just broken.
A little bit late to lament about that.
So should we just replace it with cpa_flush_all() ?
Thanks,
tglx