Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3675730ybd; Tue, 25 Jun 2019 06:41:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqyiP7L3athSLE1UIdexlcUaBbG1TL+VyYfC+oo3aq61ZmBWhnommhqCIZGDla3t40HtASEx X-Received: by 2002:a63:d415:: with SMTP id a21mr37793759pgh.229.1561470113950; Tue, 25 Jun 2019 06:41:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561470113; cv=none; d=google.com; s=arc-20160816; b=gkT5Skg5frNRW0SumlFqepJDABhagU0RA3QCDqhG0vjD8bTsmb9dCl0Muf88HnsTWq j2sRUdkZJketcLJ+2/NatwD8s4fsHcpztqrfy9a6t2P7VvuBHO9I1Yyr3IxsMVC4abnZ Xcu/imHGWKDsT8TD2rk3ATYPk///UDEYbNkDyey4Z4h4yGaVOzJp7pkHSzAPbk6imxG3 CazBXn1y8sgfGVPXC+UKu1wLnQ4PchXNrf48h8oA0Sn3jVX2MM3zzE68D6PG2boR28oc GVqSAtAjfAVuJ1VSEfqie8lK41IGWeDJKk5Q7ZVuch6qvFNeM95xy8a2D/9cq3CNtVIr SYxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=XeB/3xDQrxxJuVXFQuMuJo5SBnSx0zSjynbT8yHXjaw=; b=LQjsOoXTZGF1dV2mokuXZ12ixoDEYkSlOsR66cUYfUbMz2Xn0X46DRRya3VibFN3JK aWjbTWDNAlv8mwNWcQwgGO/Hf9VmjxjVOth5P0I4aoZsM7uNSkmD5WevZjfHH1Ey4njW +cuQaVfsovozVF25k6KNvrfrEO+eM5hlPR7Z2C0pNQ2T0uJFP692MIhlAogMIewSe3LI JL1TpGxsrlN4oxRzRO/I/ZDHqM5JR4LxYGCXCzsvTjFJn+3QfmMkJ4DwJUoNemb8ZlFm mnaUKcFLRSBNJr6LXq+yyk9vquHLnxWv8WiZw10s1SSqSjFrST2YHJLE6zsL3wMtDRW7 R8KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HA4KA6zk; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r5si12361946pgp.88.2019.06.25.06.41.38; Tue, 25 Jun 2019 06:41:53 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HA4KA6zk; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728379AbfFYNXH (ORCPT + 99 others); Tue, 25 Jun 2019 09:23:07 -0400 Received: from mail-vs1-f53.google.com ([209.85.217.53]:38013 "EHLO mail-vs1-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726707AbfFYNXH (ORCPT ); Tue, 25 Jun 2019 09:23:07 -0400 Received: by mail-vs1-f53.google.com with SMTP id k9so10878104vso.5 for ; Tue, 25 Jun 2019 06:23:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XeB/3xDQrxxJuVXFQuMuJo5SBnSx0zSjynbT8yHXjaw=; b=HA4KA6zkysUzhZVkwFh4OrxP/8T3QPuOgjRD3vYHXG832tEUmSoTTS7BnO0sHK99ja kqvusqbmQ7LQiIPAV5SPR8rzIGQzaNyZ78LptqlRxpdXnsoWCbq6H4D57Yp84Dis7PZy 4xHpT7f5PH0MXqGj4VR/n8p10ggV0pK7ZLFFLIZpXudnqfw8DH9sfhT6058yZewp1j9c tRNw0vTvMfORORGaZpwa9vPNCChsM6LEreYd2duZ18A/n1E6xLBlrCQ3oeIwja9yauqB sG0p0KznNz/R8IkY5rS+s+ex7/frp+LvLmPL0s10LGaQguXEJE1dV9a9JuHD6O15BAzQ kugA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XeB/3xDQrxxJuVXFQuMuJo5SBnSx0zSjynbT8yHXjaw=; b=aRozz0I8tytSW/t7VQvh2ku9jauMEiJiZCuOCGDfUCnqc0SN1IIqiE4N6EUij3m8Pd o60K9u3thTztZLhRzc11lRJSC8Ng6NwZpRsITLK2MBbUNAu8QiqPKuasA9gnMZhHE1r3 TL1FRDAaEperWuo+vDsK/QiYwz0SHhFU6hA/Ghhs1kACoBwKKqJCRFRnnejN5v+6BlZe y6Fkoy88Wt9VP/RvBlw7eRHaGu2nU8NlJuS96zZy/8dHxioFjCu9Rd7t1lzkJ9mQjt6r 8IDb9Ae2TUtBDDBAgqT/GIj3b1H45vlXNkViV+KI3frTA1Mv+ZnL+9YbCKgCEUKam0kN BjlQ== X-Gm-Message-State: APjAAAVkIYVHZh4OMfIWJbHSsU7XJiPIP2BM8I8TIQ0oz6RA42E9PTv3 /bf0vr+LUsF02McDEN6hwCCH405rLxHOU0MEMTs= X-Received: by 2002:a05:6102:3c8:: with SMTP id n8mr164074vsq.135.1561468986495; Tue, 25 Jun 2019 06:23:06 -0700 (PDT) MIME-Version: 1.0 References: <20190624025604.30896-1-ying.huang@intel.com> <20190624140950.GF2947@suse.de> In-Reply-To: <20190624140950.GF2947@suse.de> From: huang ying Date: Tue, 25 Jun 2019 21:23:22 +0800 Message-ID: Subject: Re: [PATCH -mm] autonuma: Fix scan period updating To: Mel Gorman Cc: Huang Ying , Andrew Morton , linux-mm@kvack.org, LKML , Rik van Riel , Peter Zijlstra , jhladky@redhat.com, lvenanci@redhat.com, Ingo Molnar Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Best Regards, Huang, Ying