Kanoj Sarcar wrote:
> >
> > This is only reliable if there is only _one_ such spinlock. As soon as
> > you have 2 users, you have a lock-up.
> >
>
> I can not follow your scenario, please give an example, involving
> cpu1, cpu2 etc, L1, L2 etc. Here is what the proposed
> spin_lock_irqsave_intercpu() function looks like in theory:
>
cpu1: cpu2:
spin_lock_irqsave_intercpu(&L1);
spin_lock_irqsave_intercpu(&L2);
; now both cpu's have disabled their interrupt flags.
send_ipi_to_other_cpu_and_wait_until_it_has_arrived();
send_ipi_to_other_cpu_and \
_wait_until_it_has_arrived();
; will sleep forever.
eg. flush_tlb_all() uses this send_ipi_to_other_cpu_and_wait().
-- Manfred- 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/
This archive was generated by hypermail 2b29 : Fri Jan 07 2000 - 21:00:04 EST