Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753581AbdHORvX (ORCPT ); Tue, 15 Aug 2017 13:51:23 -0400 Received: from mga01.intel.com ([192.55.52.88]:50235 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753469AbdHORvW (ORCPT ); Tue, 15 Aug 2017 13:51:22 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,378,1498546800"; d="scan'208";a="300472954" Subject: Re: [PATCH 2/2] mm: Update NUMA counter threshold size To: Mel Gorman Cc: Kemi Wang , Andrew Morton , Michal Hocko , Johannes Weiner , Dave , Andi Kleen , Jesper Dangaard Brouer , Ying Huang , Aaron Lu , Tim Chen , Linux MM , Linux Kernel References: <1502786736-21585-1-git-send-email-kemi.wang@intel.com> <1502786736-21585-3-git-send-email-kemi.wang@intel.com> <20170815095819.5kjh4rrhkye3lgf2@techsingularity.net> <20170815173050.xn5ffrsvdj4myoam@techsingularity.net> From: Tim Chen Message-ID: <6f58040a-d273-cbd3-98ac-679add61c337@linux.intel.com> Date: Tue, 15 Aug 2017 10:51:21 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <20170815173050.xn5ffrsvdj4myoam@techsingularity.net> Content-Type: text/plain; charset=iso-8859-15 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: 1346 Lines: 34 On 08/15/2017 10:30 AM, Mel Gorman wrote: > On Tue, Aug 15, 2017 at 09:55:39AM -0700, Tim Chen wrote: >> >> Doubling the threshold and counter size will help, but not as much >> as making them above u8 limit as seen in Kemi's data: >> >> 125 537 358906028 <==> system by default (base) >> 256 468 412397590 >> 32765 394(-26.6%) 488932078(+36.2%) <==> with this patchset >> >> For small system making them u8 makes sense. For larger ones the >> frequent local counter overflow into the global counter still >> causes a lot of cache bounce. Kemi can perhaps collect some data >> to see what is the gain from making the counters u8. >> > > The same comments hold. The increase of a cache line is undesirable but > there are other places where the overall cost can be reduced by special > casing based on how this counter is used (always incrementing by one). Can you be more explicit of what optimization you suggest here and changes to inc/dec_zone_page_state? Seems to me like we will still overflow the local counter with the same frequency unless the threshold and counter size is changed. Thanks. Tim > It would be preferred if those were addressed to see how close that gets > to the same performance of doubling the necessary storage for a counter. > doubling the storage >