Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1856727pxb; Thu, 7 Oct 2021 17:06:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx36BY2j+qZe9/TQc63J2n/4GcpNuMLcPzlQpy7XY1W5d7s7Li0NJZu1vVQCdpeCRpbiX2B X-Received: by 2002:a17:907:7388:: with SMTP id er8mr66930ejc.324.1633651606844; Thu, 07 Oct 2021 17:06:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633651606; cv=none; d=google.com; s=arc-20160816; b=AvExa65QBQrdAFF63bpjIoYf2IrQT7yinfUPeOoTDxwIxvhdItLs78nIbccNWvxh+D 0PUgvtbNrjb+N2JQ8owndulILq+VDRHOCsr8IVKiJslXpwoa9FFH9yMEiRhTJwpgApCc fJGp9mI38GTAhn0wkjQq0iu/Z1ir9MqqdHaIt40K7LJCQvstklYr+iHwG/bEAOrPObLT 3zz5suQrB6lkFp+QilsAb91c4by+hUS1VrqdTY7+HrJBz2GNy18yUhu17Q+UqBDSdRKU ZVR+D+HwvlusXk1FUV88mSgubfdN8+jn8+VisXPRFin2Qzjg3qYlCS9QFkd6H6ONEfiF dtbA== 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=E2l4u/t59h/q20DMAfNHJ1P+Em60JYoGW8kDOs9XBEo=; b=JQceqNA4kKYh7UQGIUhHcRp65w8LQJHIJ+xA9C5wMVauiwgNvWLN89XuWod2BF8q8T Jzj/1QQDxmkzepDWY/IHfypnLcXLpcz/aJYZv5e2yyoPs0WcnfG03avB3lYtjVzyZF4f bJpVvkZNYgfynLsKablTWlReoDafjL2IaAMYK4sAQ+JQO4/DDdDuYWL0IDv/MUXbjE18 aln4+XmR7xUCG7CyYjCzUaMXVWe0WrgZVwfk1k2jtX1rNzmA/hIWmwPCyZotZ7p/Cluf JB1KcjujT8m8eL6i5QISalCbtgq9V28Qlgm/JywjaSzlv2UBwisS/tb715FUwQZIv7bh 6UtQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l1si1742855ejo.68.2021.10.07.17.06.22; Thu, 07 Oct 2021 17:06:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235426AbhJHAGi (ORCPT + 99 others); Thu, 7 Oct 2021 20:06:38 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:13705 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232682AbhJHAGh (ORCPT ); Thu, 7 Oct 2021 20:06:37 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4HQT0v5Qt3zWjPG; Fri, 8 Oct 2021 08:03:11 +0800 (CST) Received: from dggpeml100016.china.huawei.com (7.185.36.216) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Fri, 8 Oct 2021 08:04:39 +0800 Received: from DESKTOP-27KDQMV.china.huawei.com (10.174.148.223) by dggpeml100016.china.huawei.com (7.185.36.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Fri, 8 Oct 2021 08:04:38 +0800 From: "Longpeng(Mike)" To: , , , CC: , , , "Longpeng(Mike)" Subject: [PATCH v3 0/2] iommu/vt-d: boost the mapping process Date: Fri, 8 Oct 2021 08:04:31 +0800 Message-ID: <20211008000433.1115-1-longpeng2@huawei.com> X-Mailer: git-send-email 2.25.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.174.148.223] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml100016.china.huawei.com (7.185.36.216) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi guys, We found that the __domain_mapping() would take too long when the memory region is too large, we try to make it faster in this patchset. The performance number can be found in PATCH 2, please review when you free, thanks. Changes v2 -> v3: - make first_pte_in_page() neater [Baolu] - remove meaningless BUG_ON() in __domain_mapping() [Baolu] Changes v1 -> v2: - Fix compile warning on i386 [Baolu] Longpeng(Mike) (2): iommu/vt-d: convert the return type of first_pte_in_page to bool iommu/vt-d: avoid duplicated removing in __domain_mapping drivers/iommu/intel/iommu.c | 11 ++++++----- include/linux/intel-iommu.h | 10 ++++++++-- 2 files changed, 14 insertions(+), 7 deletions(-) -- 1.8.3.1