Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1505120ybi; Wed, 3 Jul 2019 17:33:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqzTBGZUeL8r5U8y9WTfJ0rrVFJHXo8OXL5khEN6Ph/0aefcQcOcWN/Jk3RmxmkaWa+M9gfl X-Received: by 2002:a17:90a:26a1:: with SMTP id m30mr16345651pje.59.1562200403401; Wed, 03 Jul 2019 17:33:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562200403; cv=none; d=google.com; s=arc-20160816; b=n33PfP/4WCaDq/dXBi21dihbZ5D+wM8eE0vgLtDEH4h6K4MdqRBsKvTTqXE2da1uc8 xQe/ec1Rg3MIP4EhO874YjNf8EPVMmCz5lx2X33ay1Dqj4ZppIFpVoDjtkOxQubPCStt JUmHkH2/yBlVsZOql8zT5AlaXEmwaB/c9Nz/Q7sOi8YzcUmxczH5IKrvntjz2NbJI05g sThVSZV8UH+ewiQ9n41bZY3zTiWpYeUI7mrQx/LKaSWdZGH+XsazWEbHARQ/zBO0h4zi rJtNITdxfKT7qE+G6xP9s5mW6rTmnhqqx/aGM6bat+Qw6l+6lYjK4vqxmEkheAX6bge7 KrSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=+5BRJJ4LKHZcqKCAn0GKIas1O50SyzuCOGqOASmVXtA=; b=fjUF77UBnXqERxmbXsPIJV/HXmDLCDkjobIY1Fc6COyPf8Afw7E6iPfVvqfGnsrq3V VQie+cNRFEzw/s3EZYfCbe+c/IubMpnbLkNAKfqh3GJCaET2pxLn5Z1NcHNX3XKpgt7F VFjIgaFU8TtlM5o8IpE+7lwv7ln1iOd26YEpCtmfysg511q7gKEA2vBf4IiGlH8uN1x6 KgmbiKo2LJqjfyYu3KZxuZu2QYuJRe5q9q4R1gT4xLiXE838i5l53RDzNypnq220/ZA7 i1Nv0i0xLg96xB59xFILNk+jUBT2uLzezGW4uCOGEVdkYZnkU/VxbbGas4P/WUUT0AoM wZ1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i127si3900059pfc.177.2019.07.03.17.33.07; Wed, 03 Jul 2019 17:33:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727498AbfGDAcK (ORCPT + 99 others); Wed, 3 Jul 2019 20:32:10 -0400 Received: from mga14.intel.com ([192.55.52.115]:17261 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727326AbfGDAcJ (ORCPT ); Wed, 3 Jul 2019 20:32:09 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jul 2019 17:32:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,449,1557212400"; d="scan'208";a="164499846" Received: from yhuang-dev.sh.intel.com (HELO yhuang-dev) ([10.239.159.29]) by fmsmga008.fm.intel.com with ESMTP; 03 Jul 2019 17:32:07 -0700 From: "Huang\, Ying" To: Mel Gorman Cc: huang ying , Andrew Morton , , LKML , Rik van Riel , "Peter Zijlstra" , , , Ingo Molnar Subject: Re: [PATCH -mm] autonuma: Fix scan period updating References: <20190624025604.30896-1-ying.huang@intel.com> <20190624140950.GF2947@suse.de> <20190703091747.GA13484@suse.de> Date: Thu, 04 Jul 2019 08:32:06 +0800 In-Reply-To: <20190703091747.GA13484@suse.de> (Mel Gorman's message of "Wed, 3 Jul 2019 10:17:47 +0100") Message-ID: <87ef3663nd.fsf@yhuang-dev.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mel Gorman writes: > On Tue, Jun 25, 2019 at 09:23:22PM +0800, huang ying wrote: >> On Mon, Jun 24, 2019 at 10:25 PM Mel Gorman wrote: >> > >> > On Mon, Jun 24, 2019 at 10:56:04AM +0800, Huang Ying wrote: >> > > The autonuma scan period should be increased (scanning is slowed down) >> > > if the majority of the page accesses are shared with other processes. >> > > But in current code, the scan period will be decreased (scanning is >> > > speeded up) in that situation. >> > > >> > > This patch fixes the code. And this has been tested via tracing the >> > > scan period changing and /proc/vmstat numa_pte_updates counter when >> > > running a multi-threaded memory accessing program (most memory >> > > areas are accessed by multiple threads). >> > > >> > >> > The patch somewhat flips the logic on whether shared or private is >> > considered and it's not immediately obvious why that was required. That >> > aside, other than the impact on numa_pte_updates, what actual >> > performance difference was measured and on on what workloads? >> >> The original scanning period updating logic doesn't match the original >> patch description and comments. I think the original patch >> description and comments make more sense. So I fix the code logic to >> make it match the original patch description and comments. >> >> If my understanding to the original code logic and the original patch >> description and comments were correct, do you think the original patch >> description and comments are wrong so we need to fix the comments >> instead? Or you think we should prove whether the original patch >> description and comments are correct? >> > > I'm about to get knocked offline so cannot answer properly. The code may > indeed be wrong and I have observed higher than expected NUMA scanning > behaviour than expected although not enough to cause problems. A comment > fix is fine but if you're changing the scanning behaviour, it should be > backed up with data justifying that the change both reduces the observed > scanning and that it has no adverse performance implications. Got it! Thanks for comments! As for performance testing, do you have some candidate workloads? Best Regards, Huang, Ying