On Wed, Aug 12, 2015 at 10:52 PM, Linus Torvalds wrote: > > I get the feeling this file should be rewritten. But that's not going > to happen. The "let's just cache the last value for one jiffy" seemed > to be the minimal fixup to it. Here's a totally untested patch (I'll reboot and test soon - it does at least compile for me). Notice the total lack of locking, which means that it's fundamentally racy. I really can't find it inside myself to care. Introducing those vmalloc fields was a mistake to begin with, any races here are "ok, we get values that were valid at some point, but it might have been a second ago". And I also can't find it in myself to care about the "on 32-bit, jiffies wraps in 49 days if HZ is 1000". If somebody carefully avoids ever reading /proc/meminfo for 49 days, and then reads it in _just_ the right second, and gets a really stale value, I'm just going to do my honey badger impression. Because we really shouldn't have added the vmalloc information to /proc/meminfo to begin with, and nobody ever cares about those values anyway. Comments? Linus