Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4693406pxb; Tue, 5 Oct 2021 08:24:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjOw1cQoppmLvBdHXjrHtRRnQMzxsFEvJ9h2DqiUAScVPIFwr6TkTHExUgNaKbLNE9C5VO X-Received: by 2002:a63:5fd1:: with SMTP id t200mr8605481pgb.419.1633447462970; Tue, 05 Oct 2021 08:24:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633447462; cv=none; d=google.com; s=arc-20160816; b=vM4g3pAw8M8ER3b0aYfJc1gG9tClJ0Ha+NtUM20LKNyjAZk/Uja09w0caT/TtG/BMo C9rizF2bPfC/H+aFEe4m4IURJFwPUz2T5rRs34h0uXkbnSuAK8VplvsJqcR6I6ACWNQn YpdO0jCA/Kul8Gtz3ito42+Vb7WEpDETbEk1VTzoRySBKD2qrx79XxvcPxaOOJv2u7n+ J5t+J4S0Ls6sZE36KPoq8PrbjStZ1gvEa+wrAiZl8f5lindeeTtyeDwQuOduqpNmw+q1 KKIiWkM3MAJahgOMbu0GyVIKx8QXa2FUGaHh3U5oIr0yaZ7sZpv6jho2bCvemFhwn9I4 0xcA== 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=NtcF57FJWAPkyezPTkIbFFan9pyYxdz8pfoeIZ75CzA=; b=uB88PnQHJ6JZci/J2ajullhuehTjn9fhxWvirZDjQAIFMXFRKtATI+eN2vztPMY8z2 3UujRoWWU1rsro6cZcR2O96gNyTFqeDUBcDTm5Ngybo01DVEJdvtcXJW41IgmEVT8YVL jO4G0wqxC7tHKdLSqDKzlG1So7PN321a3CcHrfdRWBxYHC+bq7hRuLiu8KlNABamVDSO 3m9C6zIGoQFPaTQemuxewKM5h1OdcRtzqdp/b6A2a5KQed/oC2gCNyVFEaUkatKgnsnh yxWK+vnNUFPiwxCnr90dpJ/pcvdjBPPIQ2mrS64+L1jdQQyO5U1qyYNp1JbmSPIaD2BM 4WpQ== 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 y139si5518904pfb.222.2021.10.05.08.24.09; Tue, 05 Oct 2021 08:24:22 -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 S235710AbhJEPZK (ORCPT + 99 others); Tue, 5 Oct 2021 11:25:10 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:23349 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235704AbhJEPZJ (ORCPT ); Tue, 5 Oct 2021 11:25:09 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4HP1Ss45H7zRfk4; Tue, 5 Oct 2021 23:18:53 +0800 (CST) Received: from dggpeml100016.china.huawei.com (7.185.36.216) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Tue, 5 Oct 2021 23:23:15 +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; Tue, 5 Oct 2021 23:23:15 +0800 From: "Longpeng(Mike)" To: , , , CC: , , , "Longpeng(Mike)" Subject: [PATCH v2 0/2] iommu/vt-d: boost the mapping process Date: Tue, 5 Oct 2021 23:23:06 +0800 Message-ID: <20211005152308.1061-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: dggems702-chm.china.huawei.com (10.3.19.179) 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 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 | 12 +++++++----- include/linux/intel-iommu.h | 8 +++++++- 2 files changed, 14 insertions(+), 6 deletions(-) -- 1.8.3.1