Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753238AbdHWEzn (ORCPT ); Wed, 23 Aug 2017 00:55:43 -0400 Received: from mga01.intel.com ([192.55.52.88]:16419 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750931AbdHWEzm (ORCPT ); Wed, 23 Aug 2017 00:55:42 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,415,1498546800"; d="scan'208";a="1209238251" Subject: Re: [PATCH 0/2] Separate NUMA statistics from zone statistics To: kemi , Christopher Lameter References: <1502786736-21585-1-git-send-email-kemi.wang@intel.com> <403c809c-cd37-db66-5f33-3ea6b6bee52d@intel.com> Cc: Andrew Morton , Michal Hocko , Mel Gorman , Johannes Weiner , Andi Kleen , Jesper Dangaard Brouer , Ying Huang , Aaron Lu , Tim Chen , Linux MM , Linux Kernel From: Dave Hansen Message-ID: <6a72ed71-8096-9a61-e783-d750cdcaea01@linux.intel.com> Date: Tue, 22 Aug 2017 21:55:41 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <403c809c-cd37-db66-5f33-3ea6b6bee52d@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 996 Lines: 25 On 08/22/2017 06:14 PM, kemi wrote: > when performance is not important and when you want all tooling to work, you set: > > sysctl vm.strict_stats=1 > > but if you can tolerate some possible tool breakage and some decreased > counter precision, you can do: > > sysctl vm.strict_stats=0 My other thought was to try to set vm.strict_stats=0 and move to vm.strict_stats=1 (and issue a printk) when somebody reads /proc/zoneinfo (or the other files where the expensive stats are displayed). We'd need three modes for the expensive stats: 1. Off by default 2. On. (#1 transforms to this by default when stats are read) 3. Off permanently. An *actual* tunable that someone could set on systems that want to be able to read the stat files, don't care about precision, and want the best performance. That way, virtually everybody (who falls into mode #1 or #2) gets what they want. The only folks who have to mess with a tunable are the really weird, picky ones who use option #3.