Re: loopback blockdev deadlocks -- explained?

From: Tigran Aivazian (tigran@veritas.com)
Date: Thu Apr 20 2000 - 10:45:43 EST


On Tue, 18 Apr 2000, Mike Galbraith wrote:
> Thanks.. same thing I did here. (hmm.. methinks Maciej is right,
> but then again, why is APIC_DM_EXTINT a mask?)

yes, he is probably right but do you know enough of discrete 82489 APIC
internals to write the send IPI function that handles the subtleties he
is talking about and also have such hardware to test it? I don't.

I copied Scott Lurndall (not sure if his address is valid..) and two other
SGI people whose names are in kdb/*.c - perhaps they know what to do...

Regards,
Tigran

------------------- Forwarded message -------------------------

Date: Tue, 18 Apr 2000 14:27:08 +0200 (MET DST)
From: Maciej W. Rozycki <macro@ds2.pg.gda.pl>
To: Tigran Aivazian <tigran@veritas.com>
Cc: Mike Galbraith <mikeg@weiden.de>, Stephen C. Tweedie <sct@redhat.com>,
     Steve Dodd <steved@loth.demon.co.uk>, Jens Axboe <axboe@suse.de>,
     linux-kernel@vger.rutgers.edu
Subject: Re: loopback blockdev deadlocks -- explained?
                                                                              
On Tue, 18 Apr 2000, Tigran Aivazian wrote:
                                                                              
> --- linux/arch/i386/kernel/smp.c Tue Apr 18 08:56:43 2000
> +++ work/arch/i386/kernel/smp.c Mon Apr 17 21:44:59 2000
> @@ -146,7 +146,7 @@
> /*
> * Setup KDB IPI to be delivered as an NMI
> */
> - cfg = (cfg&~APIC_DEST_DM_MASK)|APIC_DEST_DM_NMI;
> + cfg = (cfg&~APIC_DM_EXTINT)|APIC_DM_NMI;
> }
> #endif /* CONFIG_KDB */
                                                                              
 Hmm, you'd better define APIC_DEST_DM_MASK for clarity, instead, just
like the original kdb patch does. Although your change is correct, it may
be confusing.
                                                                              
 There is a more serious issue with the above code -- it won't work for
i82489DX-based systems and the actual behaviour can be unpredictable. The
problem is the i82489DX requires NMI to be programmed as level-triggered
by definition and asserted and deasserted separately (the integrated APIC
has no such event as an interrupt deassertion). For this exact purpose
you'd better avoid to use send_IPI_*() functions for kdb purpose (hurting
the performance of __send_IPI_shortcut(), additionally).
                                                                              
 I believe you'd better write a separate send_IPI_NMI() function which
would properly handle NMI interrupts -- basically need to send either one
or two IPIs (depending on the version of the APIC used in a system) and in
the latter case you need to take care of the hold time for both the
assertion and the deassertion period of NMI.
                                                                              
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +

-
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 : Sun Apr 23 2000 - 21:00:17 EST