NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/54102: Multiple values from "vmstat -s" are broken

The following reply was made to PR kern/54102; it has been noted by GNATS.

From: (Michael van Elst)
Subject: Re: kern/54102: Multiple values from "vmstat -s" are broken
Date: Sat, 6 Apr 2019 18:20:19 -0000 (UTC) writes:
 >Multiple values from "vmstat -s" are unreliable and appear to overflow.
 >18446744073091529768 pagealloc desired color avail
 >18446744072282190447 pagealloc desired color not avail
 The kernel uses a signed 'int' to count such events, reports these
 as signed 'int64_t' and vmstat prints them as u64. That's true
 for a large number of values in uvmextern.
 Changing this to use unsigned would be the first thing to do.
 64bit values may not be atomic enough on some architectures.
                                 Michael van Elst
                                 "A potential Snark may lurk in every tree."

Home | Main Index | Thread Index | Old Index