On Sun, 2008-04-06 at 02:01 +0530, Balaji Rao wrote:
So many stats to steal code from,.. but you didn't :-(
Look at mm/vmstat.c, that is a rather complete example.
The trick to solving the above is to use per cpu deltas instead, the
deltas can be machine word size and are thus always read in an atomic
manner (provided they are also naturally aligned).
--