From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B901C433ED for ; Thu, 13 May 2021 03:20:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C5CD061411 for ; Thu, 13 May 2021 03:20:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C5CD061411 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4F97C6B0036; Wed, 12 May 2021 23:20:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 481806B006E; Wed, 12 May 2021 23:20:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2D4036B0070; Wed, 12 May 2021 23:20:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0049.hostedemail.com [216.40.44.49]) by kanga.kvack.org (Postfix) with ESMTP id EB3036B0036 for ; Wed, 12 May 2021 23:20:29 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 95D4F8249980 for ; Thu, 13 May 2021 03:20:29 +0000 (UTC) X-FDA: 78134754978.23.27ABE8A Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by imf20.hostedemail.com (Postfix) with ESMTP id F236C138 for ; Thu, 13 May 2021 03:20:28 +0000 (UTC) IronPort-SDR: +D/+r0fPmnQxNcVgRU9kPiwoz3i166mwgSH7ypu3/vRUDcdgSPxSTsTJUOZdeik5bfme3R7dxY ViioaaJB4/4A== X-IronPort-AV: E=McAfee;i="6200,9189,9982"; a="263789381" X-IronPort-AV: E=Sophos;i="5.82,296,1613462400"; d="scan'208";a="263789381" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2021 20:20:21 -0700 IronPort-SDR: mj7EoWy5caILec4mbk32Dm0KgdMRCgdis+B5aYwjfmce1/m431ZPlq/GAXkQxk0u9LSJU6JlnK f6t1SWydDh2g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,296,1613462400"; d="scan'208";a="623090674" Received: from allen-box.sh.intel.com (HELO [10.239.159.128]) ([10.239.159.128]) by fmsmga006.fm.intel.com with ESMTP; 12 May 2021 20:20:14 -0700 Cc: baolu.lu@linux.intel.com, linux-hyperv@vger.kernel.org, brijesh.singh@amd.com, linux-mm@kvack.org, hpa@zytor.com, kys@microsoft.com, will@kernel.org, sunilmut@microsoft.com, linux-arch@vger.kernel.org, wei.liu@kernel.org, sthemmin@microsoft.com, linux-scsi@vger.kernel.org, x86@kernel.org, mingo@redhat.com, kuba@kernel.org, jejb@linux.ibm.com, thomas.lendacky@amd.com, Tianyu Lan , arnd@arndb.de, haiyangz@microsoft.com, bp@alien8.de, tglx@linutronix.de, vkuznets@redhat.com, martin.petersen@oracle.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, netdev@vger.kernel.org, akpm@linux-foundation.org, robin.murphy@arm.com, davem@davemloft.net Subject: Re: [Resend RFC PATCH V2 10/12] HV/IOMMU: Add Hyper-V dma ops support To: Tianyu Lan , Christoph Hellwig , konrad.wilk@oracle.com References: <20210414144945.3460554-1-ltykernel@gmail.com> <20210414144945.3460554-11-ltykernel@gmail.com> <20210414154729.GD32045@lst.de> From: Lu Baolu Message-ID: <7cda690b-adb0-1f5f-2048-b52f75c0399f@linux.intel.com> Date: Thu, 13 May 2021 11:19:26 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US X-Rspamd-Queue-Id: F236C138 Authentication-Results: imf20.hostedemail.com; dkim=none; spf=none (imf20.hostedemail.com: domain of baolu.lu@linux.intel.com has no SPF policy when checking 134.134.136.100) smtp.mailfrom=baolu.lu@linux.intel.com; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=intel.com (policy=none) X-Rspamd-Server: rspam03 X-Stat-Signature: m53qttonykt6ugdkuoxeokrzoc5g7mr5 Received-SPF: none (linux.intel.com>: No applicable sender policy available) receiver=imf20; identity=mailfrom; envelope-from=""; helo=mga07.intel.com; client-ip=134.134.136.100 X-HE-DKIM-Result: none/none X-HE-Tag: 1620876028-906900 Content-Transfer-Encoding: quoted-printable 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: On 5/13/21 12:01 AM, Tianyu Lan wrote: > Hi Christoph and Konrad: > =C2=A0=C2=A0=C2=A0=C2=A0 Current Swiotlb bounce buffer uses a pool for= all devices. There > is a high overhead to get or free bounce buffer during performance test= . > Swiotlb code now use a global spin lock to protect bounce buffer data. > Several device queues try to acquire the spin lock and this introduce > additional overhead. >=20 > For performance and security perspective, each devices should have a > separate swiotlb bounce buffer pool and so this part needs to rework. > I want to check this is right way to resolve performance issues with=20 > swiotlb bounce buffer. If you have some other suggestions,welcome. Is this what you want? https://lore.kernel.org/linux-iommu/20210510095026.3477496-1-tientzu@chro= mium.org/ Best regards, baolu