Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3650252ybg; Fri, 25 Oct 2019 07:06:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwjb/y3vROn7VnotnI+lkw3twxPOx/OFjCC9j8JIETnrs5DJBU7ufb8R8dbrL/husl6TV0E X-Received: by 2002:aa7:c1d4:: with SMTP id d20mr2202958edp.47.1572012409308; Fri, 25 Oct 2019 07:06:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572012409; cv=none; d=google.com; s=arc-20160816; b=t/9VcuZPW4AWfqR5QT5+foPBDD1zD7M0WQChPRdAp+ongayKO/nYr2dic41YaMPh1w XsNre8WEwRNp1yUsFEvZI4V2ppWM6ijATUydiPMsjVpM1WfhlTfkWNp28hAOcxh7c7b4 MqgiSuP/bghH67ZrmwbDKNXuq8MeESuyXVsH969YOxo85M/16GiY9NrCa4T1xT9B30fw 8oA+iSQgUrF3BDCc1vMWiIEA/QxMs6dosfQAHTfFxiShbAd6qNMJ0WGjBi++PXPldHGO f7irNYXkfH+2pFDjB9jPwke+EkwHeMF6pRKpY/7jUkN/sTxmFlyMEGSZcRWpZzqb4QiR paGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=1HpFa2VDLCfUehJD95gUR87IyHE3Gjtnu9jbZOJCpv8=; b=N4PEESnTR3PpuVwOXyOtRDCMtjqU1OeT/jbu7EJeYJopkonLUxQHnXjEgjmtEq8Eki 1AZF7yOxO+kqqO+SB7JwynRsnlgJDUennWpepUHXB8aAt5nn4UpnbRWHg5cqneotB6Iw F9MOJzMdONBSK4cIUpMwor4VVEmOQb/OO3SMv07NnyXQwTVXwNqGZiwITf4E/YxFxmUR CyCIz2w3V918uUyGU6/fSq4MSViouUst9+kfgmyi0IlNTAk2NNg6PEQvSBBlYZ20AIX0 GyOWR7pzUk+vfT4SDvYKOFoJ9gaJ266xQDuKH6nmMlSp3dbaBa65wWWGbPBNwgIxX8xk N+lg== 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 r19si651364ejz.6.2019.10.25.07.06.23; Fri, 25 Oct 2019 07:06:49 -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 S2503048AbfJXPTh (ORCPT + 99 others); Thu, 24 Oct 2019 11:19:37 -0400 Received: from mga02.intel.com ([134.134.136.20]:22168 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403837AbfJXPTg (ORCPT ); Thu, 24 Oct 2019 11:19:36 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Oct 2019 08:19:18 -0700 X-IronPort-AV: E=Sophos;i="5.68,225,1569308400"; d="scan'208";a="188617592" Received: from ahduyck-desk1.jf.intel.com ([10.7.198.76]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Oct 2019 08:19:17 -0700 Message-ID: Subject: Re: [PATCH v12 2/6] mm: Use zone and order instead of free area in free_list manipulators From: Alexander Duyck To: David Hildenbrand , Alexander Duyck , kvm@vger.kernel.org, mst@redhat.com, linux-kernel@vger.kernel.org, willy@infradead.org, mhocko@kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, mgorman@techsingularity.net, vbabka@suse.cz Cc: yang.zhang.wz@gmail.com, nitesh@redhat.com, konrad.wilk@oracle.com, pagupta@redhat.com, riel@surriel.com, lcapitulino@redhat.com, dave.hansen@intel.com, wei.w.wang@intel.com, aarcange@redhat.com, pbonzini@redhat.com, dan.j.williams@intel.com, osalvador@suse.de Date: Thu, 24 Oct 2019 08:19:17 -0700 In-Reply-To: <78caedba-fc29-20d8-3043-2d7598aa3652@redhat.com> References: <20191022221223.17338.5860.stgit@localhost.localdomain> <20191022222805.17338.3243.stgit@localhost.localdomain> <860dda361b6e0b94908d94beb0ad9f5519c8f2cf.camel@linux.intel.com> <78caedba-fc29-20d8-3043-2d7598aa3652@redhat.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2019-10-24 at 11:32 +0200, David Hildenbrand wrote: > On 23.10.19 17:16, Alexander Duyck wrote: > > On Wed, 2019-10-23 at 10:26 +0200, David Hildenbrand wrote: > > > On 23.10.19 00:28, Alexander Duyck wrote: > > > > From: Alexander Duyck > > > > > > > > In order to enable the use of the zone from the list manipulator functions > > > > I will need access to the zone pointer. As it turns out most of the > > > > accessors were always just being directly passed &zone->free_area[order] > > > > anyway so it would make sense to just fold that into the function itself > > > > and pass the zone and order as arguments instead of the free area. > > > > > > > > In order to be able to reference the zone we need to move the declaration > > > > of the functions down so that we have the zone defined before we define the > > > > list manipulation functions. Since the functions are only used in the file > > > > mm/page_alloc.c we can just move them there to reduce noise in the header. > > > > > > > > Reviewed-by: Dan Williams > > > > Reviewed-by: David Hildenbrand > > > > Reviewed-by: Pankaj Gupta > > > > Signed-off-by: Alexander Duyck > > > > --- > > > > include/linux/mmzone.h | 32 ----------------------- > > > > mm/page_alloc.c | 67 +++++++++++++++++++++++++++++++++++------------- > > > > 2 files changed, 49 insertions(+), 50 deletions(-) > > > > > > Did you see > > > > > > https://lore.kernel.org/lkml/20191001152928.27008.8178.stgit@localhost.localdomain/T/#m4d2bc2f37bd7bdc3ae35c4f197905c275d0ad2f9 > > > > > > this time? > > > > > > And the difference to the old patch is only an empty line. > > > > > > > I saw the report. However I have not had much luck reproducing it in order > > to get root cause. Here are my results for linux-next 20191021 with that > > patch running page_fault2 over an average of 3 runs: > > It would have been good if you'd reply to the report or sth. like that. > Then people (including me) are aware that you looked into it and what > your results of your investigation were. I'll try to be more careful to remember to do that in the future. > > Baseline: 3734692.00 > > This patch: 3739878.67 > > > > Also I am not so sure about these results as the same patch had passed > > previously before and instead it was patch 3 that was reported as having a > > -1.2% regression[1]. All I changed in response to that report was to add > > Well, previously there was also a regression in the successor > PageReported() patch, not sure how they bisect in this case. This is one of the things that has me thinking this is a possible code alignment type issue. In the past when chasing down network performance issues I would see these kind of things when a loop went from being cache line aligned to not being aligned. > > page_is_reported() which just wrapped the bit test for the reported flag > > in a #ifdef to avoid testing it for the blocks that were already #ifdef > > wrapped anyway. > > > > I am still trying to see if I can get access to a system that would be a > > better match for the one that reported the issue. My working theory is > > I barely see false positives (well, I also barely see reports at all) on > MM, that's why I asked. Like I said, I will dig into this. > > that maybe it requires a high core count per node to reproduce. Either > > that or it is some combination of the kernel being tested on and the patch > > is causing some loop to go out of alignment and become more expensive. > > Yes, double check that the config and the setup roughly matches what has > been reported. I've been testing with the same .config and version of gcc. The last bit I am trying now is to test with the same exact kernel source. I figure if I can reproduce the issue with that then I can figure out exact root cause, even if there isn't much we can do since the issue doesn't appear with the latest patch set.