When generating the zone stats make sure to handle the master zone
("UMA Zone") carefully, because it does not have pcpu caches allocated at all. In the UP case, we did not catch this because one pcpu cache is always allocated with the zone, but for the MP case, we were getting bogus stats for this zone. Tested by: Lukas Ertl <le@univie.ac.at>
This commit is contained in:
parent
0d4bdece59
commit
260d19ed7e
@ -2119,6 +2119,13 @@ sysctl_vm_zone(SYSCTL_HANDLER_ARGS)
|
||||
cachefree += cache->uc_freebucket->ub_ptr + 1;
|
||||
CPU_UNLOCK(cpu);
|
||||
}
|
||||
/*
|
||||
* The "UMA Zones" zone (master zone) does not have pcpu
|
||||
* caches allocated for it, so the above computation is entirely
|
||||
* bogus. Re-set cachefree to 0 in that case.
|
||||
*/
|
||||
if (z == zones)
|
||||
cachefree = 0;
|
||||
LIST_FOREACH(bucket, &z->uz_full_bucket, ub_link) {
|
||||
cachefree += bucket->ub_ptr + 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user