Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752047AbdDJEcJ (ORCPT ); Mon, 10 Apr 2017 00:32:09 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:36269 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751587AbdDJEcH (ORCPT ); Mon, 10 Apr 2017 00:32:07 -0400 Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=fb.com; Date: Sun, 9 Apr 2017 21:31:07 -0700 From: Shaohua Li To: "Sun, Ning" CC: Joerg Roedel , "linux-kernel@vger.kernel.org" , "Wei, Gang" , "hpa@linux.intel.com" , "mingo@kernel.org" , "kernel-team@fb.com" , "srihan@fb.com" , "Eydelberg, Alex" Subject: Re: [RFC] x86/tboot: add an option to disable iommu force on Message-ID: <20170410043106.GA90090@MacBook-Pro-63.local.dhcp.thefacebook.com> References: <20170322104900.GE8329@suse.de> <20170322115055.GA35752@dhcp-172-20-162-56.dhcp.thefacebook.com> <20170403191927.GA35817@MacBook-Pro.local> <20170407100840.GB23944@suse.de> <83BE7A8C0111FD48951B68B36BEFDFD40CF39F36@ORSMSX107.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <83BE7A8C0111FD48951B68B36BEFDFD40CF39F36@ORSMSX107.amr.corp.intel.com> User-Agent: Mutt/1.8.0 (2017-02-23) X-Originating-IP: [2620:10d:c090:180::11ae] X-ClientProxiedBy: BN6PR21CA0012.namprd21.prod.outlook.com (10.173.197.22) To DM5PR15MB1642.namprd15.prod.outlook.com (10.175.105.151) X-MS-Office365-Filtering-Correlation-Id: 39a4fbee-3764-4b3c-9275-08d47fca6f28 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075)(201703031133081);SRVR:DM5PR15MB1642; X-Microsoft-Exchange-Diagnostics: 1;DM5PR15MB1642;3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S+A=;20:CJMTXp+Ti7Sl7izXRpsvPZhcdJjL+pAYMBQn7yyYuhjHc57C1x+YqLugtOOPc8+YKtin32idGfSZBsjjgDZWw6d0j3g+wbzaPJFIN/Vu8cqahXGrYbeVwq9rT+Qzvdy/Bbf9o/Hau5H0YkZr/2Kw3c6w3tPX62RQliJHgOyz//U+cAP9aN2KII+3utNMV092/0J02e+KsClRhl+bthE9ZAkU5WVp+QX+elVC785HT543ODpLsOOP/yeciinx4vfHP0svj4XlGNqYHhRcmnnaRtYMc8DhrpE3/88DRI395PYkgV3F2jQdGuou35oAQ5RROx9NznRd/miG+/PsXrCoRxTWaXcoUnWA860ZsRDak1JbobbVD3DBxTozxmbyTjMmGZ5VH0f5GsG8UBClij+lEjADFFfU5h8g+/+38tBz+KICEX6W6daceUPUnBroV+X3t6xjBt7CqAKq3TFZktYo9KiLHUUh6OeSAvpdusIq7iujdnIiPB/upR6CxGRGkMHG X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192374486261705)(9452136761055)(67672495146484)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(6072148);SRVR:DM5PR15MB1642;BCL:0;PCL:0;RULEID:;SRVR:DM5PR15MB1642; X-Microsoft-Exchange-Diagnostics: 1;DM5PR15MB1642;4:7cTlxai6gTgQMmK7vMly8Bfi+cq0oLTbivl5tk/ThCWQuMB9pkZMDUM5vqG3PJp9LrA39xBVOPubiBWpdi0Vyj/uRxaVtHmGflO+5VmHEtPR6g3pvGZGeWFy7SvrUCm6BKQ95ursshUYWbVPXMiKO+VNCYaNcpRwOnVyxzYnuF/suDaclmwlbVyhRRWc4HxNOi0HtKRCOERmzKzabppiG92q+f/4sVS3clc3wj7mAttsTyo+nw4lqxvjtAcZqNk5Von04Q4y+44UKnAOPjnAhGnngVn7vmp1ejun06ZBlVhg026jWPFuCZIBlTA4tqJUQJvvuXc63xhEqhgX7bGrhTKLmdWYRKT6axC949OLW5HMAu6QoEHu+/swtCMAGDXZ1oebuMB6V4tXklSjCo2xeLYUBVoMAC4N94bXSi0xkj9ekmX2ulu2JrMc4KplaWcJmDm9DkIYQNE6uAOUM5hwpYjeqvUDHDvPZIk03MNifa3J2GB9CXcPLky5+VahpThqlEBvoyj7a6yuSnJ1xpxOIqLn43loCyqbdISA2wdia5Gh4Nc3HPNOmIFmXHnHIOz27OBExxgGHZWz/ml4GFujdshIvvYJgGt5nKTEVdYLh95CXpHybWoQ4wO0ymkRs5FymvxVaU4zVtzZiGu/B187KIyT/1VSkXF0ttkMwq4DW+N8MJH5X7keiMyQNih8371h48NB6/1YA9KFQ2Z7gHZVBm2PuJdluIEmZE8KgXojzHMTxDnAzM/arXeUnrnCufdi1QJJdBpGXzDsRLeaiXN2U42gT8GbNwbu7FngYsJff1qSntbbd6+oE7+td71aV00x89p14glPdgAosGtc4FebFEkfdgGC7RHBfwXHcBMidgQ= X-Forefront-PRVS: 027367F73D X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(39450400003)(39840400002)(39850400002)(39400400002)(39410400002)(24454002)(377454003)(4001350100001)(97756001)(2906002)(47776003)(189998001)(42186005)(38730400002)(53546009)(6246003)(25786009)(53936002)(9686003)(6506006)(54906002)(81166006)(55016002)(8676002)(229853002)(110136004)(5660300001)(4326008)(83506001)(305945005)(2950100002)(6666003)(6916009)(7736002)(6116002)(23726003)(1076002)(98436002)(86362001)(50466002)(33656002)(50986999)(54356999)(76176999)(46406003)(93886004)(18370500001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR15MB1642;H:MacBook-Pro-63.local.dhcp.thefacebook.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM5PR15MB1642;23:dQKRtDKOafHN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xfrNLuAqmQDDpp1dvOWMvhGQ==;24:53bacK126veY3LP/tGbLjim1T75nb/29U/UcMaJ98hnKl+Q+7K4uhykg2/DXrt0BJbPQ/PYXrR4jtQdaSjswDn57a2xSh7wDPN3lMTCamyI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM5PR15MB1642;7:589FUcUuqIgM5Xd07WzmPVD/dFxEogyeL+le6fThSnQ13Wpt/5dcdPS3TUdAQumgHS7+FSa7Owkww6RHcq2F8Sd28H9Zuzcrvha6jjhixQnJgPIi10ajvReNgc7F0ywuj7BEASRqCEKhbGM3C6R8FxGa5rjmt+CMMad8WnsspEIwZH17SpOSptjyYXyqsGUCKSI8STW56lyqlwGVIrG5RP+ua0nujG0DT2atWYvQPHNQ2x10fdWX4LHpCMrfaPFc70/CIRxkldSadRYC9hMxWFlC/zQFUTx5Sjk11kV8KQO41HsU85bAUWtSzGTmXkEP19ML+vBtNdfYt8BMJOQGQw==;20:uBQklpcxSnHJ46awFVdymI37ehfeWNDYdKBPqv83RNMCi6/1tFEXfGlo0yV4xZqUxAbilzf1SwS+HBmvYaytunBnV5lQY+6nvbSGg14omNbR591oCwMK+Ijjg9pIrhCRE9uaiQsCXHlUoDVVrtHRu4LrU9IbpadweUmsuiWicxU= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2017 04:31:17.5140 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR15MB1642 X-OriginatorOrg: fb.com X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-10_03:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2324 Lines: 52 On Fri, Apr 07, 2017 at 09:49:52PM +0000, Sun, Ning wrote: > Hi Shaohua, > > One question, did you still see the network performance penalty when Linux kernel cmdline intel_iommu was set to off ( intel_iommu=off) ? the boot parameter has no effect, it runs very early and set dmar_disable=1. The tboot code (tboot_force_iommu) runs later and force dmar_disabled = 0. Thanks, Shaohua > Thanks, > -ning > > -----Original Message----- > From: Joerg Roedel [mailto:jroedel@suse.de] > Sent: Friday, April 07, 2017 3:09 AM > To: Shaohua Li > Cc: linux-kernel@vger.kernel.org; Wei, Gang ; hpa@linux.intel.com; mingo@kernel.org; kernel-team@fb.com; Sun, Ning ; srihan@fb.com; Eydelberg, Alex > Subject: Re: [RFC] x86/tboot: add an option to disable iommu force on > > On Mon, Apr 03, 2017 at 12:19:28PM -0700, Shaohua Li wrote: > > On Wed, Mar 22, 2017 at 07:50:55AM -0400, Shaohua Li wrote: > > > On Wed, Mar 22, 2017 at 11:49:00AM +0100, Joerg Roedel wrote: > > > > Hi Shaohua, > > > > > > > > On Tue, Mar 21, 2017 at 11:37:51AM -0700, Shaohua Li wrote: > > > > > IOMMU harms performance signficantly when we run very fast > > > > > networking workloads. This is a limitation in hardware based on > > > > > our observation, so we'd like to disable the IOMMU force on, but > > > > > we do want to use TBOOT and we can sacrifice the DMA security > > > > > bought by IOMMU. I must admit I know nothing about TBOOT, but > > > > > TBOOT guys (cc-ed) think not eabling IOMMU is totally ok. > > > > > > > > Can you elaborate a bit more on the setup where the IOMMU still > > > > harms network performance? With the recent scalability > > > > improvements I measured only a minimal impact on 10GBit networking. > > > Hi, > > > > > > It's 40GB networking doing XDP test. Software overhead is almost > > > unaware, but it's the IOTLB miss (based on our analysis) which kills > > > the performance. We observed the same performance issue even with > > > software passthrough (identity mapping), only the hardware > > > passthrough survives. The pps with iommu (with software passthrough) is only about ~30% of that without it. > > > > Any update on this? > > An explicit Ack from the tboot guys would be good to have. > > > Joerg >