From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA78CCA9ED1 for ; Fri, 1 Nov 2019 11:13:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7E88A21D71 for ; Fri, 1 Nov 2019 11:13:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E88A21D71 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 242626B0005; Fri, 1 Nov 2019 07:13:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1F3906B0006; Fri, 1 Nov 2019 07:13:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 108C26B0007; Fri, 1 Nov 2019 07:13:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0029.hostedemail.com [216.40.44.29]) by kanga.kvack.org (Postfix) with ESMTP id E36DE6B0005 for ; Fri, 1 Nov 2019 07:13:12 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 7F068180AD83E for ; Fri, 1 Nov 2019 11:13:12 +0000 (UTC) X-FDA: 76107447024.12.spark33_73455e95bed1b X-HE-Tag: spark33_73455e95bed1b X-Filterd-Recvd-Size: 2427 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Fri, 1 Nov 2019 11:13:12 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 53013B25F; Fri, 1 Nov 2019 11:13:10 +0000 (UTC) Date: Fri, 1 Nov 2019 11:13:08 +0000 From: Mel Gorman To: "Huang, Ying" Cc: Peter Zijlstra , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Michal Hocko , Rik van Riel , Ingo Molnar , Dave Hansen , Dan Williams , Fengguang Wu Subject: Re: [RFC 02/10] autonuma: Reduce cache footprint when scanning page tables Message-ID: <20191101111308.GO28938@suse.de> References: <20191101075727.26683-1-ying.huang@intel.com> <20191101075727.26683-3-ying.huang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20191101075727.26683-3-ying.huang@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Nov 01, 2019 at 03:57:19PM +0800, Huang, Ying wrote: > From: Huang Ying > > In auto NUMA balancing page table scanning, if the pte_protnone() is > true, the PTE needs not to be changed because it's in target state > already. So other checking on corresponding struct page is > unnecessary too. > > So, if we check pte_protnone() firstly for each PTE, we can avoid > unnecessary struct page accessing, so that reduce the cache footprint > of NUMA balancing page table scanning. > > In the performance test of pmbench memory accessing benchmark with > 80:20 read/write ratio and normal access address distribution on a 2 > socket Intel server with Optance DC Persistent Memory, perf profiling > shows that the autonuma page table scanning time reduces from 1.23% to > 0.97% (that is, reduced 21%) with the patch. > > Signed-off-by: "Huang, Ying" Acked-by: Mel Gorman This patch is independent of the series and should be resent separately. Alternatively Andrew, please pick this patch up on its own. -- Mel Gorman SUSE Labs