From owner-p4-projects@FreeBSD.ORG Thu Jul 6 21:21:47 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D4C9116A4E0; Thu, 6 Jul 2006 21:21:46 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 980EF16A4DD for ; Thu, 6 Jul 2006 21:21:46 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 320B443D46 for ; Thu, 6 Jul 2006 21:21:46 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k66LLkdn049395 for ; Thu, 6 Jul 2006 21:21:46 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k66LLjnt049392 for perforce@freebsd.org; Thu, 6 Jul 2006 21:21:45 GMT (envelope-from jb@freebsd.org) Date: Thu, 6 Jul 2006 21:21:45 GMT Message-Id: <200607062121.k66LLjnt049392@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 100793 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2006 21:21:47 -0000 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;