Re: [patch] SMP race fix [was Re: SMP lockup & 3c509 on 2.2.x [aka. the Deadly 'ping -f']]

Linus Torvalds (torvalds@transmeta.com)
Thu, 6 May 1999 14:11:06 -0700 (PDT)


On Thu, 6 May 1999, Andrea Arcangeli wrote:
>
> synchronize_irq flush _all_ irq handlers but it won't assure you that
> there won't be any kind of irq handlers running after a bit. It _can' t_
> do that, it has not enough information to do that.

Yes. And that's pretty fundamental, I fear (not fundamental to us, it's
just a fundamental synchronization problem that we can't really handle
in the general case).

> >can't be a new irq after the call, because we just disabled it (and we
>
> Wrong. There can be since we may have an irq handler running after the
> first spin_unlock below, while disable_irq() is running on the other CPU:

No. Only if disable_irq() is buggy.

Andrea, I already _said_ that I agree with disable_irq() being buggy.
That's not the issue - and was addressed by your first patch (which then
had the lock-up problem, but that's a separate issue and can be simply
addressed). It's the second patch I still think was fairly ugly.

However, the later versions of that second patch are looking much nicer
and have the lockup problem addressed cleanly, so I'm looking at them
seriously now.

Linus

-
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/