Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968102AbdD0PTI (ORCPT ); Thu, 27 Apr 2017 11:19:08 -0400 Received: from mx2.suse.de ([195.135.220.15]:43774 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S967867AbdD0PS7 (ORCPT ); Thu, 27 Apr 2017 11:18:59 -0400 Date: Thu, 27 Apr 2017 17:18:55 +0200 From: Joerg Roedel To: Shaohua Li Cc: Ingo Molnar , linux-kernel@vger.kernel.org, gang.wei@intel.com, hpa@linux.intel.com, kernel-team@fb.com, ning.sun@intel.com, srihan@fb.com, alex.eydelberg@intel.com Subject: Re: [PATCH V2] x86/tboot: add an option to disable iommu force on Message-ID: <20170427151855.GW5077@suse.de> References: <1c2cadcf5cd7d19cea93c56435610e61b551bd1e.1493223474.git.shli@fb.com> <20170427065142.lnsdegq7zwxacqo2@gmail.com> <20170427084207.GU5077@suse.de> <20170427144901.GA98840@dhcp-172-26-110-153.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170427144901.GA98840@dhcp-172-26-110-153.dhcp.thefacebook.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1005 Lines: 22 On Thu, Apr 27, 2017 at 07:49:02AM -0700, Shaohua Li wrote: > This is exactly the usage for us. And please note, not everybody should > sacrifice the DMA security. It is only required when the pcie device hits iommu > hardware limitation. In our enviroment, normal network workloads (as high as > 60k pps) are completely ok with iommu enabled. Only the XDP workload, which can > do around 200k pps, is suffering from the problem. So completely forcing iommu > off for some workloads without the performance issue isn't good because of the > DMA security. How big are the packets in your XDP workload? I also run pps tests for performance measurement on older desktop-class hardware (Xeon E5-1620 v2 and AMD FX 6100) and 10GBit network hardware, and easily get over the 200k pps mark with IOMMU enabled. The Intel system can receive >900k pps and the AMD system is still at ~240k pps. But my tests only send IPv4/UDP packets with 8bytes of payload, so that is probably different to your setup. Joerg