Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752489AbbKYQEr (ORCPT ); Wed, 25 Nov 2015 11:04:47 -0500 Received: from resqmta-ch2-02v.sys.comcast.net ([69.252.207.34]:42589 "EHLO resqmta-ch2-02v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751135AbbKYQEq (ORCPT ); Wed, 25 Nov 2015 11:04:46 -0500 Date: Wed, 25 Nov 2015 10:04:44 -0600 (CST) From: Christoph Lameter X-X-Sender: cl@east.gentwo.org To: Joonsoo Kim cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] mm/vmstat: retrieve more accurate vmstat value In-Reply-To: <20151125025735.GC9563@js1304-P5Q-DELUXE> Message-ID: References: <1448346123-2699-1-git-send-email-iamjoonsoo.kim@lge.com> <20151125025735.GC9563@js1304-P5Q-DELUXE> Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1250 Lines: 28 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/