Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5972618ybe; Tue, 10 Sep 2019 11:33:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFlNfJVzvGYWmjvXE8S7kpe8KuzOfOm58xWtEDiBnKeu44VWctrJ4Qby/ba3a536YQTDdp X-Received: by 2002:aa7:da51:: with SMTP id w17mr279941eds.70.1568140389353; Tue, 10 Sep 2019 11:33:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568140389; cv=none; d=google.com; s=arc-20160816; b=JUWyohMC5dvT7lFe66r+y/giAQ3YWezbpesPPPukqppV64jmIXi5afzvk/7M44mcf3 c15zVLjMk3AzFg3YuY4L7CkGiRD4wML4JINDkqrawDVCug62++uLIQtqfJv8Fvr574st iB6nDxtU/8ZBgk4jiDyAtKg5CSJP8O1bk4qGRMXpJsgQAegr0KMGz/y3Tfymn5YIY5fU KTdbBCWS35gNPGhHcnlH0Hh33aQNJAHFE6goSiTiKHcv0D8cOhdYNucjm1+jloOSJ/9E u15x4ownouO+VXmYHuZnr8gBuWAa5BQQP0cH+OKIe5vCTBWzft5G81by5PKffMacc+J2 Cugw== 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=wIRIJetclmzQ16cHR95tOTOqBX5j+PNw2MTB0K37Gu4=; b=OYT3uVDvfRXfLu7ewCk/654YvHjVRj68YA9xN5JbfFbtD6tXam7joSpa38p5Mlu+wv 3G3qI/t7As3jIJdnz6zqzLQQFxjJY6RgbPSeaeIINFzWVSxV/zFhkdtu03owmjOyqf2h 8Y+09MixSYs0qlS23NKeVH2tQCsj8/aXamW6AYw9h6bb0dvNnqFaNCCDoDGy+tYcwRDn gubbkbRGXmjMeA7TJovCwuWNzgXYcX2If/+vHc0RJTQ2voiObRENMQkuxT//67KrbH9I UC90lk6qO0U3KtpvTHeeknw9gWemMVJ3AWJ+59cBgnzPUV11va7fMgAB03y48H3XrkV8 siaQ== 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 v2si12447823edm.80.2019.09.10.11.32.37; Tue, 10 Sep 2019 11:33:09 -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 S2388113AbfIIP1C (ORCPT + 99 others); Mon, 9 Sep 2019 11:27:02 -0400 Received: from mga01.intel.com ([192.55.52.88]:45300 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727451AbfIIP1C (ORCPT ); Mon, 9 Sep 2019 11:27:02 -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 fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Sep 2019 08:27:01 -0700 X-IronPort-AV: E=Sophos;i="5.64,486,1559545200"; d="scan'208";a="175011691" 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; 09 Sep 2019 08:27:01 -0700 Message-ID: <5cfa877d02b1a6dadbb28f40111726245cf7856f.camel@linux.intel.com> Subject: Re: [PATCH v9 5/8] arm64: Move hugetlb related definitions out of pgtable.h to page-defs.h From: Alexander Duyck To: David Hildenbrand , Alexander Duyck , virtio-dev@lists.oasis-open.org, kvm@vger.kernel.org, mst@redhat.com, catalin.marinas@arm.com, dave.hansen@intel.com, linux-kernel@vger.kernel.org, willy@infradead.org, mhocko@kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, will@kernel.org, linux-arm-kernel@lists.infradead.org, osalvador@suse.de Cc: yang.zhang.wz@gmail.com, pagupta@redhat.com, konrad.wilk@oracle.com, nitesh@redhat.com, riel@surriel.com, lcapitulino@redhat.com, wei.w.wang@intel.com, aarcange@redhat.com, ying.huang@intel.com, pbonzini@redhat.com, dan.j.williams@intel.com, fengguang.wu@intel.com, kirill.shutemov@linux.intel.com Date: Mon, 09 Sep 2019 08:27:01 -0700 In-Reply-To: <90785d30-cde9-f380-5f4a-8af989b11729@redhat.com> References: <20190907172225.10910.34302.stgit@localhost.localdomain> <20190907172545.10910.88045.stgit@localhost.localdomain> <90785d30-cde9-f380-5f4a-8af989b11729@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 Mon, 2019-09-09 at 10:52 +0200, David Hildenbrand wrote: > On 07.09.19 19:25, Alexander Duyck wrote: > > From: Alexander Duyck > > > > Move the static definition for things such as HUGETLB_PAGE_ORDER out of > > asm/pgtable.h and place it in page-defs.h. By doing this the includes > > become much easier to deal with as currently arm64 is the only architecture > > that didn't include this definition in the asm/page.h file or a file > > included by it. > > > > It also makes logical sense as PAGE_SHIFT was already defined in > > page-defs.h so now we also have HPAGE_SHIFT defined there as well. > > > > Signed-off-by: Alexander Duyck > > --- > > arch/arm64/include/asm/page-def.h | 9 +++++++++ > > arch/arm64/include/asm/pgtable.h | 9 --------- > > 2 files changed, 9 insertions(+), 9 deletions(-) > > > > diff --git a/arch/arm64/include/asm/page-def.h b/arch/arm64/include/asm/page-def.h > > index f99d48ecbeef..1c5b079e2482 100644 > > --- a/arch/arm64/include/asm/page-def.h > > +++ b/arch/arm64/include/asm/page-def.h > > @@ -20,4 +20,13 @@ > > #define CONT_SIZE (_AC(1, UL) << (CONT_SHIFT + PAGE_SHIFT)) > > #define CONT_MASK (~(CONT_SIZE-1)) > > > > +/* > > + * Hugetlb definitions. > > + */ > > +#define HUGE_MAX_HSTATE 4 > > +#define HPAGE_SHIFT PMD_SHIFT > > +#define HPAGE_SIZE (_AC(1, UL) << HPAGE_SHIFT) > > +#define HPAGE_MASK (~(HPAGE_SIZE - 1)) > > +#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) > > + > > I wonder if you should initially limit "config PAGE_REPORTING" to x86 > only and unlock it for the other targets once we actually test it there. > Or did you test PAGE_REPORTING on other architectures as well? > I haven't, but essentially the effects should be the same regardless of architecture. In addition since this is a feature that can be enabled/disabled via QEMU I am not sure there is much harm other than getting additional testing by enabling for all of the architectures at once.