Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751400AbdIPCKL convert rfc822-to-8bit (ORCPT ); Fri, 15 Sep 2017 22:10:11 -0400 Received: from mga14.intel.com ([192.55.52.115]:35063 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751121AbdIPCKJ (ORCPT ); Fri, 15 Sep 2017 22:10:09 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,400,1500966000"; d="scan'208";a="151948498" From: "Wang, Kemi" To: Michal Hocko CC: "Luis R . Rodriguez" , Kees Cook , Andrew Morton , Jonathan Corbet , Mel Gorman , Johannes Weiner , Christopher Lameter , Sebastian Andrzej Siewior , Vlastimil Babka , Hillf Danton , Dave , "Chen, Tim C" , "Kleen, Andi" , Jesper Dangaard Brouer , "Huang, Ying" , "Lu, Aaron" , "Proc sysctl" , Linux MM , "Linux Kernel" Subject: RE: [PATCH 1/3] mm, sysctl: make VM stats configurable Thread-Topic: [PATCH 1/3] mm, sysctl: make VM stats configurable Thread-Index: AQHTLgSCfIK+cWKsUE+i8ah6VYPSJ6K1T1YAgAFyYpA= Date: Sat, 16 Sep 2017 02:10:05 +0000 Message-ID: <25017BF213203E48912DB000DE5F5E1E6B3EAE9E@SHSMSX101.ccr.corp.intel.com> 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> In-Reply-To: <20170915114952.czb7nbsioqguxxk3@dhcp22.suse.cz> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTc2MjMwZmYtNDA1NS00ZGM0LTg5NjktMmJiMWM0N2JmNDUyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IjhoSXdQbmwrZHJ2bHI3TG94NHdSN2thMFJqOCtWNWRVVHZEUjdQakpMR2c9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2383 Lines: 41 -----Original Message----- From: Michal Hocko [mailto:mhocko@kernel.org] Sent: Friday, September 15, 2017 7:50 PM To: Wang, Kemi Cc: Luis R . Rodriguez ; Kees Cook ; Andrew Morton ; Jonathan Corbet ; Mel Gorman ; Johannes Weiner ; Christopher Lameter ; Sebastian Andrzej Siewior ; Vlastimil Babka ; Hillf Danton ; Dave ; Chen, Tim C ; Kleen, Andi ; Jesper Dangaard Brouer ; Huang, Ying ; Lu, Aaron ; Proc sysctl ; Linux MM ; Linux Kernel Subject: Re: [PATCH 1/3] mm, sysctl: make VM stats configurable 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). 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. -- Michal Hocko SUSE Labs