Message ID | 20231214073912.1938330-1-sunnanyong@huawei.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp8362239dys; Wed, 13 Dec 2023 23:01:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IHIU6/eGy3zYRszo4tFvVwDOXowjUs72+4Z1nLW6y6vxiO8/yJygHmNqdUJugyRkGhvHN9U X-Received: by 2002:a62:5ec6:0:b0:6ce:3835:812c with SMTP id s189-20020a625ec6000000b006ce3835812cmr8387484pfb.65.1702537291499; Wed, 13 Dec 2023 23:01:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702537291; cv=none; d=google.com; s=arc-20160816; b=bZjZQBVAU/qDjW7yURCPBEYRcH8y7dsGuDOEx500cG3N++1aoUcG8HxcG1HBG9H6SC aGJPgPEhS+VKFa75a43BT7nuRPHfCv3ooHJEQT5MOjjZo8ZCx9nfKvZho2wH6sx62NEu qSRhmh332zd1j5Y9BLOZa0k+6RNHVKxzs/0LRcv53EVM8qRAWyC5YTl0ZavRiZYxNb6Q fRHglvIEZhpM0J8E3tsM+w/CWIQUHoJL5J8I93brSHrpnWUaNeuoljkVHvSplgXoBCfU 2ZO6991yj+4GRMGdqrAd0DhKg0HMbJjC1n/lY9az+K+Ex766kL77DBoypqvEdwbC5t2g /I1w== 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 :message-id:date:subject:cc:to:from; bh=zkm8rvAGEv0LKCXzTEOtOXNwyGIA6bwY9vczMlTOMgM=; fh=IBRY2OfN0iTWW2ZjSSKvUJynIiV/JLaiDZe55wN3MqA=; b=i767uNWVdt/rOw2aE7jbcTpMJ5O8Rgj9pb1PhnV2PQDf3mrgntDsXSC/1sKwKvYGP0 sWkcRekFJj3iFk1A18Q98P4pSDpI5VeuA0hqtUrAjYpzPmV/lnz3GKcZ2fofNz+RjWn9 H2i6eMGIG592vTkK40DClvxJrQh6LgRfh2xw53Ika1a0QOV7kox2HZGT+gOG4g8NM4v6 dYd42EiMm3gjm/IYCxSn14gLXABu89LyqYhTpTrKhenRFT/lPKjMJURKciJ5IAewhlDB dEvQZ/kno6PQXmd6yDR0B4M+kTiv41woHrDU+IkFYtHGo0zrnWVp/DQdgzfGiLoLQc0x XsRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id m7-20020a635807000000b005bdf5961826si10570709pgb.136.2023.12.13.23.01.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 23:01:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 52FD88029DCC; Wed, 13 Dec 2023 23:01:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443250AbjLNHBV (ORCPT <rfc822;dexuan.linux@gmail.com> + 99 others); Thu, 14 Dec 2023 02:01:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234327AbjLNHBU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 14 Dec 2023 02:01:20 -0500 Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64B18B9 for <linux-kernel@vger.kernel.org>; Wed, 13 Dec 2023 23:01:26 -0800 (PST) Received: from mail.maildlp.com (unknown [172.19.163.44]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4SrN5f142zz29fnb; Thu, 14 Dec 2023 14:40:38 +0800 (CST) Received: from kwepemm000003.china.huawei.com (unknown [7.193.23.66]) by mail.maildlp.com (Postfix) with ESMTPS id 5BBC4140134; Thu, 14 Dec 2023 14:41:46 +0800 (CST) Received: from huawei.com (10.175.113.32) by kwepemm000003.china.huawei.com (7.193.23.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 14 Dec 2023 14:41:45 +0800 From: Nanyong Sun <sunnanyong@huawei.com> To: <catalin.marinas@arm.com>, <will@kernel.org>, <mike.kravetz@oracle.com>, <muchun.song@linux.dev>, <akpm@linux-foundation.org>, <anshuman.khandual@arm.com> CC: <willy@infradead.org>, <wangkefeng.wang@huawei.com>, <sunnanyong@huawei.com>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <linux-mm@kvack.org> Subject: [PATCH 0/3] A Solution to Re-enable hugetlb vmemmap optimize on Arm Date: Thu, 14 Dec 2023 15:39:09 +0800 Message-ID: <20231214073912.1938330-1-sunnanyong@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.32] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm000003.china.huawei.com (7.193.23.66) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 13 Dec 2023 23:01:30 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785239742861509756 X-GMAIL-MSGID: 1785239742861509756 |
Series |
A Solution to Re-enable hugetlb vmemmap optimize on Arm
|
|
Message
Nanyong Sun
Dec. 14, 2023, 7:39 a.m. UTC
HVO was previously disabled on arm64 [1] due to the lack of necessary BBM(break-before-make) logic when changing page tables. This set of patches fix this by adding necessary BBM sequence when changing page table, and supporting vmemmap page fault handling to fixup kernel address fault if vmemmap is concurrently accessed. [1] commit 060a2c92d1b6 ("arm64: mm: hugetlb: Disable HUGETLB_PAGE_OPTIMIZE_VMEMMAP") Nanyong Sun (3): mm: HVO: introduce helper function to update and flush pgtable arm64: mm: HVO: support BBM of vmemmap pgtable safely arm64: mm: Re-enable OPTIMIZE_HUGETLB_VMEMMAP arch/arm64/Kconfig | 1 + arch/arm64/include/asm/esr.h | 4 ++ arch/arm64/include/asm/mmu.h | 20 ++++++++ arch/arm64/mm/fault.c | 94 ++++++++++++++++++++++++++++++++++++ arch/arm64/mm/mmu.c | 28 +++++++++++ mm/hugetlb_vmemmap.c | 55 ++++++++++++++++----- 6 files changed, 190 insertions(+), 12 deletions(-)