Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/sparc64 retry timed out IPIs, complain and ...



details:   https://anonhg.NetBSD.org/src/rev/f852cdc0c18d
branches:  trunk
changeset: 448844:f852cdc0c18d
user:      macallan <macallan%NetBSD.org@localhost>
date:      Mon Feb 11 07:51:46 2019 +0000

description:
retry timed out IPIs, complain and dump timing info into dmesg
ok martin@

diffstat:

 sys/arch/sparc64/sparc64/vm_machdep.c |  15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diffs (49 lines):

diff -r 6d658ded2609 -r f852cdc0c18d sys/arch/sparc64/sparc64/vm_machdep.c
--- a/sys/arch/sparc64/sparc64/vm_machdep.c     Mon Feb 11 07:07:37 2019 +0000
+++ b/sys/arch/sparc64/sparc64/vm_machdep.c     Mon Feb 11 07:51:46 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm_machdep.c,v 1.101 2015/11/06 15:30:59 martin Exp $ */
+/*     $NetBSD: vm_machdep.c,v 1.102 2019/02/11 07:51:46 macallan Exp $ */
 
 /*
  * Copyright (c) 1996-2002 Eduardo Horvath.  All rights reserved.
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.101 2015/11/06 15:30:59 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.102 2019/02/11 07:51:46 macallan Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -305,12 +305,13 @@
        }
 
        for (ci = cpus; ci != NULL; ci = ci->ci_next) {
-               int spincount;
+               int spincount, retrycount=0;
 
                if (ci == curcpu() || !CPUSET_HAS(cpus_active, ci->ci_index))
                        continue;
                if (ci->ci_fplwp != l)
                        continue;
+again:
                sparc64_send_ipi(ci->ci_cpuid, save ?
                                 sparc64_ipi_save_fpstate :
                                 sparc64_ipi_drop_fpstate, (uintptr_t)l, 0);
@@ -319,9 +320,13 @@
                while (ci->ci_fplwp == l) {
                        membar_Sync();
                        spincount++;
-                       if (spincount > 10000000)
-                               panic("fpusave_lwp ipi didn't");
+                       if (spincount > 10000000) {
+                               printf("fpusave_lwp ipi didn't (%d)\n", retrycount);
+                               retrycount++;
+                               goto again;
+                       }
                }
+               if (retrycount > 0) printf("spincount %d\n", spincount);
                break;
        }
 #else



Home | Main Index | Thread Index | Old Index