Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750918AbdIRENR (ORCPT ); Mon, 18 Sep 2017 00:13:17 -0400 Received: from mga04.intel.com ([192.55.52.120]:22030 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750710AbdIRENQ (ORCPT ); Mon, 18 Sep 2017 00:13:16 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,410,1500966000"; d="scan'208";a="129690756" Subject: Re: [PATCH 2/3] mm: Handle numa statistics distinctively based-on different VM stats modes To: kemi , Michal Hocko References: <1505467406-9945-1-git-send-email-kemi.wang@intel.com> <1505467406-9945-3-git-send-email-kemi.wang@intel.com> <20170915115049.vqthfawg3y4r6ogh@dhcp22.suse.cz> <26bd25c8-294f-d3cc-8ba2-845a6da33fe5@intel.com> Cc: "Luis R . Rodriguez" , Kees Cook , Andrew Morton , Jonathan Corbet , Mel Gorman , Johannes Weiner , Christopher Lameter , Sebastian Andrzej Siewior , Vlastimil Babka , Tim Chen , Andi Kleen , Jesper Dangaard Brouer , Ying Huang , Aaron Lu , Proc sysctl , Linux MM , Linux Kernel From: Dave Hansen Message-ID: <1bd90605-c765-ca27-b8ee-ca803a8bcdea@linux.intel.com> Date: Sun, 17 Sep 2017 21:13:13 -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: <26bd25c8-294f-d3cc-8ba2-845a6da33fe5@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: 492 Lines: 18 On 09/17/2017 08:07 PM, kemi wrote: >>> + if (vmstat_mode) { >>> + if (vmstat_mode == VMSTAT_COARSE_MODE) >>> + return; >>> + } else if (disable_zone_statistics) >>> + return; >>> + >>> if (z->node != numa_node_id()) >>> local_stat = NUMA_OTHER; >> >> A jump label could make this completely out of the way for the case >> where every single cycle matters. > > Could you be more explicit for how to implement it here. Thanks very much. Take a look at include/linux/jump_label.h.