The UP -current was not properly counting the per-cpu VM stats in the

sysctl code.  This makes 'systat -vm 1's syscall count work again.

Submitted by:	Michal Mertl <mime@traveller.cz>
Note:		also slated for 5.0
This commit is contained in:
Matthew Dillon 2002-12-22 05:04:30 +00:00
parent 6c82636572
commit 9991ea7178

View File

@ -217,6 +217,9 @@ vcnt(SYSCTL_HANDLER_ARGS)
struct pcpu *pcpu = pcpu_find(i);
count += *(int *)((char *)&pcpu->pc_cnt + offset);
}
#else
int offset = (char *)arg1 - (char *)&cnt;
count += *(int *)((char *)PCPU_PTR(cnt) + offset);
#endif
error = SYSCTL_OUT(req, &count, sizeof(int));
return(error);