(unknown charset) COUNT_IPIS vs CPU_FOREACH

From: (unknown charset) Andriy Gapon <avg_at_FreeBSD.org>
Date: Sat, 07 May 2011 12:37:26 +0300
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
_at__at_ -1687,7 +1687,7 _at__at_ 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
Received on Sat May 07 2011 - 07:37:30 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:13 UTC