Linux-kernel mailing list archive 1999-23,: Re: [patch] fix for SMP stuck on IPI-TLB-flush [Re: 2.2.9-ac2 locks solid]

# Re: [patch] fix for SMP stuck on IPI-TLB-flush [Re: 2.2.9-ac2 locks solid]

Ingo Molnar (mingo@chiara.csoma.elte.hu)
Mon, 7 Jun 1999 18:45:42 +0200 (CEST)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Ingo Molnar: "Re: [patch] fix for SMP stuck on IPI-TLB-flush [Re: 2.2.9-ac2 locks solid]"
- Previous message: Thomas Pornin: "OT: How does Linux work?"

On Mon, 7 Jun 1999, Andrea Arcangeli wrote:

> CPU1 CPU2
> spin_lock_irq() -> __cli()
> /* irq locally disabled */
> lock_kernel() (kernel_flag
> acquired)
> flush_tlb_page()
> lock_kernel();
> /* spin on the lock with irq
> disabled */
> send IPI
> /* never execute
> smp_invalidate irq */
> /* deadlock */
>
> Right now to avoid this scenario we must simply never call lock_kernel()
> with irq disabled.

ugh, some time ago i added a 'sti' to lock_kernel() for exactly this
reason. The bug got reintroduced when we switched to a spin_lock()-ed
kernel lock.

> I changed also a bit also the way we send the tlb flush. I resolved the
> locking quite easily since I am delivering an NMI to all other CPUS. The
> only necessary enforcement is that all calls to smp_flush_tlb _must_ be
> serialized by some kind of lock, currently the big kernel lock.

as i said in the previous mail, _dont_ do this Andrea. At least not in
2.2. This way we might trigger CPU bugs never seen before.

-- mingo

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

- Next message: Ingo Molnar: "Re: [patch] fix for SMP stuck on IPI-TLB-flush [Re: 2.2.9-ac2 locks solid]"
- Previous message: Thomas Pornin: "OT: How does Linux work?"