Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp192466iog; Wed, 29 Jun 2022 21:48:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tlEO+QaEx0xH2oqhePLV3mDrsACAlYuf1XqV2Uf4fzyFC9Kv52It8uDQT/ccvatW+thc4P X-Received: by 2002:a17:90b:896:b0:1ef:2963:953d with SMTP id bj22-20020a17090b089600b001ef2963953dmr5499147pjb.203.1656564525464; Wed, 29 Jun 2022 21:48:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656564525; cv=none; d=google.com; s=arc-20160816; b=GLhHzaCdANHFz+jywue8Uq6IGIieispYFnhk9ZdzGvQL60wfSoxN5lu0eMwXkpokiE BV2qc5unXzL7smS6g+iUSEkHzJ3stNoDB0Kb3xZ4wo5XvUgq0WklWrRZGXsRB8AO7pXL R5I6DEht/bP0lMtmIEgbgHgQ1fWi3R1dvas3R2egqfnXocnXxcR2yR7CE5k7ya+QwlD/ 2NGXG5/pGMhGE8yFKgOC3ITaWoVTu4nP//OTyMZjn1H28Bv8XskMAl6NOwOTukZsd7hw lbAzTKW0GpXo1lUCCTGFInq1Oy6E7+Gbu43shk7LIGnhn/TTP0/zKcD8AT+XxZLFf0zU fOVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=HcPfGMo9yq8rnng8rkEyYgJf7e79hPuTXrey5TTCR0k=; b=vwMly7TF+RMiDi+k7BB/ZNIm2j4CMnsgALd5OvqHl/AvZh5ZiKSPT29Ta469W0vHLT vOi6PonOYWLZ0mNhRErBd+E7SnJuIEkt6UBvU5ijUGBCCbPGR1YhViBKzJDHrhZnELzB rwvyAW4aojMC5qRla4LAbaqYzSqkZ0mk9Wt9KLrNM6KnL/E02c6BRfAOm9XdEn7K17bF PzYlyngeaM1tFYQUTSQPZmYBywNEGLkxHshEp1adp4PmEowx4r2j29C3Lp+XsVueuC1d uvczUB4k7cvTI3S3T0y5k62KQc/6my6ezvEKatPBn7uc8LpHbSYphqwCF6dintmt/IX1 UsOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n4-20020a170902d2c400b0016a29b20dd4si29391261plc.238.2022.06.29.21.48.23; Wed, 29 Jun 2022 21:48:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232133AbiF3EeO (ORCPT + 99 others); Thu, 30 Jun 2022 00:34:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231617AbiF3EeN (ORCPT ); Thu, 30 Jun 2022 00:34:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E58571F2D7; Wed, 29 Jun 2022 21:34:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8BF39620F6; Thu, 30 Jun 2022 04:34:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3983EC34115; Thu, 30 Jun 2022 04:34:07 +0000 (UTC) From: Huacai Chen To: Arnd Bergmann , Huacai Chen , Thomas Bogendoerfer , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Catalin Marinas , Will Deacon Cc: loongarch@lists.linux.dev, linux-arch@vger.kernel.org, Xuefeng Li , Guo Ren , Xuerui Wang , Jiaxun Yang , Andrew Morton , linux-mm@kvack.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Feiyang Chen , Huacai Chen Subject: [PATCH V2 4/4] LoongArch: Enable ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP Date: Thu, 30 Jun 2022 12:32:37 +0800 Message-Id: <20220630043237.2059576-5-chenhuacai@loongson.cn> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220630043237.2059576-1-chenhuacai@loongson.cn> References: <20220630043237.2059576-1-chenhuacai@loongson.cn> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Feiyang Chen The feature of minimizing overhead of struct page associated with each HugeTLB page is implemented on x86_64. However, the infrastructure of this feature is already there, so just select ARCH_WANT_HUGETLB_PAGE_ OPTIMIZE_VMEMMAP is enough to enable this feature for LoongArch. To avoid build error on LoongArch we should include linux/static_key.h in page-flags.h. Signed-off-by: Huacai Chen Signed-off-by: Feiyang Chen --- arch/loongarch/Kconfig | 1 + include/linux/page-flags.h | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig index 55ab84fd70e5..8e56ca28165e 100644 --- a/arch/loongarch/Kconfig +++ b/arch/loongarch/Kconfig @@ -49,6 +49,7 @@ config LOONGARCH select ARCH_USE_QUEUED_RWLOCKS select ARCH_USE_QUEUED_SPINLOCKS select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT + select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP select ARCH_WANTS_NO_INSTR select BUILDTIME_TABLE_SORT select COMMON_CLK diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index e66f7aa3191d..28a53ac7aa3e 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -9,6 +9,7 @@ #include #include #include +#include #ifndef __GENERATING_BOUNDS_H #include #include -- 2.27.0