Re: [PATCH] mm/vmstat: retrieve more accurate vmstat value
From: Christoph Lameter
Date: Wed Nov 25 2015 - 11:04:50 EST
On Wed, 25 Nov 2015, Joonsoo Kim wrote:
> I think that maintaining duplicate counter to guarantee accuracy isn't
> reasonable solution. It would cause more overhead to the system.
Simply remove the counter from the vmstat handling and do it differently
then.
> Although vmstat values aren't designed for accuracy, these are already
> used by some sensitive places so it is better to be more accurate.
The design is to sacrifice accuracy and the time the updates occur for
performance reasons. This is not the purpose the counters were designed
for. If you put these demands on the vmstat then you will get complex
convoluted code and compromise performance.
> What this patch does is just adding current cpu's diff to global value
> when retrieving in order to get more accurate value and this would not be
> expensive. I think that it doesn't break any design principle of vmstat.
There have been a number of expectations recently regarding the accuracy
of vmstat. We are on the wrong track here.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/