Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753782AbbKXPgM (ORCPT ); Tue, 24 Nov 2015 10:36:12 -0500 Received: from resqmta-ch2-01v.sys.comcast.net ([69.252.207.33]:44971 "EHLO resqmta-ch2-01v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752496AbbKXPgL (ORCPT ); Tue, 24 Nov 2015 10:36:11 -0500 Date: Tue, 24 Nov 2015 09:36:09 -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, Joonsoo Kim Subject: Re: [PATCH] mm/vmstat: retrieve more accurate vmstat value In-Reply-To: <1448346123-2699-1-git-send-email-iamjoonsoo.kim@lge.com> Message-ID: References: <1448346123-2699-1-git-send-email-iamjoonsoo.kim@lge.com> 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: 833 Lines: 18 On Tue, 24 Nov 2015, Joonsoo Kim wrote: > When I tested compaction in low memory condition, I found that > my benchmark is stuck in congestion_wait() at shrink_inactive_list(). > This stuck last for 1 sec and after then it can escape. More investigation > shows that it is due to stale vmstat value. vmstat is updated every 1 sec > so it is stuck for 1 sec. vmstat values are not designed to be accurate and are not guaranteed to be accurate. Comparing to specific values should not be done. If you need an accurate counter then please use another method of accounting like an atomic. -- 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/