From owner-freebsd-current@FreeBSD.ORG Sat May 7 09:37:30 2011 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D53C1065670 for ; Sat, 7 May 2011 09:37:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id E6F7F8FC08 for ; Sat, 7 May 2011 09:37:29 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA05925 for ; Sat, 07 May 2011 12:37:28 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1QIdx1-0004BB-Vj for current@FreeBSD.org; Sat, 07 May 2011 12:37:27 +0300 Message-ID: <4DC512D6.9070904@FreeBSD.org> Date: Sat, 07 May 2011 12:37:26 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110503 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: current@FreeBSD.org X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=X-VIET-VPS Content-Transfer-Encoding: 7bit Cc: Subject: COUNT_IPIS vs CPU_FOREACH X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 09:37:30 -0000 I believe that the following change is needed to fix COUNT_IPIS option. Right now it seems to be a noop. mp_ipi_intrcnt: CPU_FOREACH can't be used this early ... because all_cpus is not set yet. diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 33bb424..3d957ec 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -1687,7 +1687,7 @@ mp_ipi_intrcnt(void *dummy) char buf[64]; int i; - CPU_FOREACH(i) { + for (i = 0; i <= mp_maxid; i++) { snprintf(buf, sizeof(buf), "cpu%d:invltlb", i); intrcnt_add(buf, &ipi_invltlb_counts[i]); snprintf(buf, sizeof(buf), "cpu%d:invlrng", i); -- Andriy Gapon