Port-sparc64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Softing firing on wrong cpu



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On Oct 29, 2009, at 11:47 AM, Martin Husemann wrote:

Hi folks,

I see a (more or less reproducable) problem that looks like a softint
is scheduled on cpu0 but fires on cpu1. It then hits a KASSERT since on
that cpu the sofint is not marked si_active.

I added some instrumentation and couldn't explain things unless in
softint_overlay the l_cpu pointer of the passed lwp is not curcpu(), so
I added a KASSERT to verify.

Unfortunately with that change I have never been able to reproduce the problem
again.

Index: kern_softint.c
===================================================================
RCS file: /cvsroot/src/sys/kern/kern_softint.c,v
retrieving revision 1.29
diff -u -p -r1.29 kern_softint.c
--- kern_softint.c      19 Jul 2009 10:11:55 -0000      1.29
+++ kern_softint.c      29 Oct 2009 13:41:28 -0000
@@ -720,6 +730,7 @@ softint_overlay(void)
        si = ((softcpu_t *)ci->ci_data.cpu_softcpu)->sc_int;

        KASSERT((l->l_pflag & LP_INTR) == 0);
+       KASSERT(ci == curcpu());

        /* Arrange to elevate priority if the LWP blocks. */
        s = splhigh();


Now if I can trust my eyes I did write ==, not =, so the problem going
away suprises me a bit.

Anybody got an idea that does not boild down to "cache coherency problem
at CPUINFO_VA"?

I've seen softints fire on the wrong CPU on macppc for a while now, usually under heavy load.

have fun
Michael

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iQEVAwUBSum7rspnzkX8Yg2nAQLijwgAjxhvsgVtBSH8F6Niubl0OWZ0Ko1C5M+V
m0HjRyIctSmKNcnXXMrjcxr6v6g2BwbB/0OujmMuIrHVPKwok1sqzjoRN99dOyTR
NGGWE6D2PGx7uSxc13MKimv4+p2F7n9dEy1qFbwYANp3DxOkw8rBWkGwCrtt+NjC
jyaGhvPOr8oJtjTm398RVTDk0c8/ThJYBpaYLWpwgdaCSi8GJusxz54Mjv7Bkw6m
5VnHEyD5//vefwPowqRk5aYS1ZaO1d2phV/HS0S7Mam3M78vObfUfA85MA4WSR5n
p/xrHlQEOtK9wQhrpj4DuQv0zuPSa13+aba4CkXH7eV9oiLqvNby6g==
=i6+3
-----END PGP SIGNATURE-----


Home | Main Index | Thread Index | Old Index