Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751812AbdIRDX4 (ORCPT ); Sun, 17 Sep 2017 23:23:56 -0400 Received: from mga14.intel.com ([192.55.52.115]:63648 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751340AbdIRDXz (ORCPT ); Sun, 17 Sep 2017 23:23:55 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,410,1500966000"; d="scan'208";a="901194238" Subject: Re: [PATCH 1/3] mm, sysctl: make VM stats configurable To: Michal Hocko Cc: "Luis R . Rodriguez" , Kees Cook , Andrew Morton , Jonathan Corbet , Mel Gorman , Johannes Weiner , Christopher Lameter , Sebastian Andrzej Siewior , Vlastimil Babka , kemi , Dave , Tim Chen , Andi Kleen , Jesper Dangaard Brouer , Ying Huang , Aaron Lu , Proc sysctl , Linux MM , Linux Kernel References: <1505467406-9945-1-git-send-email-kemi.wang@intel.com> <1505467406-9945-2-git-send-email-kemi.wang@intel.com> <20170915114952.czb7nbsioqguxxk3@dhcp22.suse.cz> From: kemi Message-ID: <8cb99df9-3db3-99fc-8fc1-c9f14b2d9017@intel.com> Date: Mon, 18 Sep 2017 11:22:37 +0800 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: <20170915114952.czb7nbsioqguxxk3@dhcp22.suse.cz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1584 Lines: 37 On 2017年09月15日 19:49, Michal Hocko wrote: > On Fri 15-09-17 17:23:24, Kemi Wang wrote: >> This patch adds a tunable interface that allows VM stats configurable, as >> suggested by Dave Hansen and Ying Huang. >> >> When performance becomes a bottleneck and you can tolerate some possible >> tool breakage and some decreased counter precision (e.g. numa counter), you >> can do: >> echo [C|c]oarse > /proc/sys/vm/vmstat_mode >> >> When performance is not a bottleneck and you want all tooling to work, you >> can do: >> echo [S|s]trict > /proc/sys/vm/vmstat_mode >> >> We recommend automatic detection of virtual memory statistics by system, >> this is also system default configuration, you can do: >> echo [A|a]uto > /proc/sys/vm/vmstat_mode >> >> The next patch handles numa statistics distinctively based-on different VM >> stats mode. > > I would just merge this with the second patch so that it is clear how > those modes are implemented. I am also wondering why cannot we have a > much simpler interface and implementation to enable/disable numa stats > (btw. sysctl_vm_numa_stats would be more descriptive IMHO). > Apologize for resending it, because I found my previous reply mixed with Michal's in many email client. The motivation is that we propose a general tunable interface for VM stats. This would be more scalable, since we don't have to add an individual Interface for each type of counter that can be configurable. In the second patch, NUMA stats, as an example, can benefit for that. If you still hold your idea, I don't mind to merge them together.