One issue I have on amd64 while trying to build the kernel with all uvmexp members promoted to uint64_t is the use of atomic operations. For example, swpgonly is modified atomically in several places and those expect an int. I think only a few members are accessed in this way.
On Sat, Jul 03, 2021 at 11:20:42AM +0100, Stuart Henderson wrote: > On 2021/07/03 01:09, Anindya Mukherjee wrote: > > Thanks for the discussion. This has been very illuminating. I have been > > digging > > around in /usr/src/ and ignoring the atomic architectures (where I got > > stuck) it > > looks like it should be possible to use uint64_t everywhere. I'm playing > > with > > some changes on my machine to see if I can get at least systat(1) and > > vmstat(8) > > to work with uint64_t. The ddb printer (uvmexp_print)is another consumer. > > > > If it works in the base system then ideally every relevant port should be > > updated to be consistent. That is indeed quite a big change; more than I > > realised so thanks for setting me straight on that. > > We have coped with bigger changes in structs like this before, > it didn't used to be too difficult, but that was before go... >