From patchwork Thu Oct 27 12:52:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Huacai Chen X-Patchwork-Id: 13022079 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93919FA3740 for ; Thu, 27 Oct 2022 12:57:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 35D518E0002; Thu, 27 Oct 2022 08:57:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 316A48E0001; Thu, 27 Oct 2022 08:57:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1B09D8E0002; Thu, 27 Oct 2022 08:57:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 0C61A8E0001 for ; Thu, 27 Oct 2022 08:57:34 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id D0D22801A2 for ; Thu, 27 Oct 2022 12:57:33 +0000 (UTC) X-FDA: 80066730786.19.F1EF9E1 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf29.hostedemail.com (Postfix) with ESMTP id 0F187120014 for ; Thu, 27 Oct 2022 12:57:32 +0000 (UTC) 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 sin.source.kernel.org (Postfix) with ESMTPS id 446FDCE26A7; Thu, 27 Oct 2022 12:57:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61B56C433C1; Thu, 27 Oct 2022 12:57:23 +0000 (UTC) From: Huacai Chen To: Arnd Bergmann , Huacai Chen , Thomas Bogendoerfer , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Catalin Marinas , Will Deacon , Dinh Nguyen 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 , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Huacai Chen Subject: [PATCH V14 4/4] LoongArch: Enable ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP Date: Thu, 27 Oct 2022 20:52:53 +0800 Message-Id: <20221027125253.3458989-5-chenhuacai@loongson.cn> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20221027125253.3458989-1-chenhuacai@loongson.cn> References: <20221027125253.3458989-1-chenhuacai@loongson.cn> MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666875453; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wJkIwYtwUypGffNw9OMXvs06WWR+71d2I07NOIfPXbI=; b=GTGuP3hKXLW0jBa4gFdh7JhHErxMp+5INpMwkEVuGqeuQsUZkfXDgxvMWKD87tH2dKRmQe 9tOhW+oRjHmmwpUXQ0EGGuEHaa0c27vcgcH2ITa9x3jRZxWT8tFvUSYTIGq5gattXhC3R4 z+7fZMd+I03VtR3bs+UMpU7d48whIKg= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=none; spf=pass (imf29.hostedemail.com: domain of "SRS0=/zKB=24=loongson.cn=chenhuacai@kernel.org" designates 145.40.73.55 as permitted sender) smtp.mailfrom="SRS0=/zKB=24=loongson.cn=chenhuacai@kernel.org"; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666875453; a=rsa-sha256; cv=none; b=QylAFErCVqWo6UdilDOwfCR5NHc4Rros4kPVp52GDow59VdFYtdKAYxubvSYRcDZhAzJT/ Dot/4sk5Kqu1msV8/Mkt9malPag5jWGGDl/B9C3VHDmr6J4H7XKcqHNspgQrq8X7Pml/F9 kzYXOeoWt1Yy7D11vKHhCtFfPueLOM8= X-Rspamd-Queue-Id: 0F187120014 Authentication-Results: imf29.hostedemail.com; dkim=none; spf=pass (imf29.hostedemail.com: domain of "SRS0=/zKB=24=loongson.cn=chenhuacai@kernel.org" designates 145.40.73.55 as permitted sender) smtp.mailfrom="SRS0=/zKB=24=loongson.cn=chenhuacai@kernel.org"; dmarc=none X-Rspam-User: X-Rspamd-Server: rspam10 X-Stat-Signature: pni8znk9phxnca5ztzkz6ah7r587eu79 X-HE-Tag: 1666875452-331576 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: 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. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Feiyang Chen Signed-off-by: Huacai Chen Acked-by: Muchun Song --- arch/loongarch/Kconfig | 1 + 1 files changed, 1 insertions(+) diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig index 6f7fa0c0ca08..0a6ef613124c 100644 --- a/arch/loongarch/Kconfig +++ b/arch/loongarch/Kconfig @@ -52,6 +52,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_WANT_LD_ORPHAN_WARN select ARCH_WANTS_NO_INSTR select BUILDTIME_TABLE_SORT