Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Jul 2006 21:21:45 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 100793 for review
Message-ID:  <200607062121.k66LLjnt049392@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=100793

Change 100793 by jb@jb_freebsd2 on 2006/07/06 21:21:33

	Integrate the diagnostic change for the unacked ipis.

Affected files ...

.. //depot/projects/dtrace/src/sys/sun4v/sun4v/pmap.c#6 integrate

Differences ...

==== //depot/projects/dtrace/src/sys/sun4v/sun4v/pmap.c#6 (text+ko) ====

@@ -1218,12 +1218,13 @@
 pmap_ipi(pmap_t pmap, char *func, uint64_t arg1, uint64_t arg2)
 {
 
-	int i, cpu_count;
+	int i, cpu_count, retried;
 	u_int cpus;
 	cpumask_t cpumask, active, curactive;
 	cpumask_t active_total, ackmask;
 	uint16_t *cpulist;
 
+	retried = 0;
 
 	if (!smp_started)
 		return (0);
@@ -1271,11 +1272,25 @@
 			 (uint64_t)arg2, (uint64_t *)&ackmask);
 
 	while (ackmask != curactive) {
-		DELAY(1);
+		membar(Sync);
 		i++;
-		if (i > 1000000) 
-			panic(" ackmask=0x%x active=0x%x\n", ackmask, curactive);
+		if (i > 10000000) {
+			uint64_t cpu_state;
+			printf("cpu with cpumask=0x%x appears to not be responding to ipis\n",
+			       curactive & ~ackmask);
+
+			hv_cpu_state((uint64_t)ffs64(curactive & ~ackmask), &cpu_state);
+			printf("cpu_state of %ld is %ld\n", ffs64(curactive & ~ackmask), cpu_state);
+			if (!retried) {
+				printf("I'm going to send off another ipi just to confirm that it isn't a memory barrier bug\n"
+			       "and then I'm going to panic\n");
+
+				retried = 1;
+				goto retry;
+			}
 
+				panic(" ackmask=0x%x active=0x%x\n", ackmask, curactive);
+		}
 	}
 
 	active_total |= curactive;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607062121.k66LLjnt049392>