From: konrad@kernel.org Subject: [PATCH v4] Fix interrupt latency of HVM PCI passthrough devices. Date: Wed, 10 Sep 2014 16:26:13 -0400 Message-ID: <1410380774-894-1-git-send-email-konrad@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XRnV3-0007Ic-SH for xen-devel@lists.xenproject.org; Wed, 10 Sep 2014 19:24:18 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org, jbeulich@suse.com List-Id: xen-devel@lists.xenproject.org Please see this patch which I hope meets your standards. There are two pieces of code that might be a bit odd: 1). The usage of 'int cpu = smp_processor_id()' and then using it just once, instead of using '*this_cpu' in schedule_dpci_for. The reason is that Andrew pointed out to me (in the tasklet review) that we want to spend as little time as possible in the critical code and hence moving the 'cpu = smp_processor_id()' out would do that. 2). The assert: ASSERT(list_empty(&per_cpu(dpci_list, cpu))); Other code in the hypervisor has 'ASSERT( list_empty..') but the syntax in the io.c file is to have no spaces in the ASSERT. If you would like it to be the same - ASSERT( x ), I can prepare a cleanup patch to fix that. Otherwise it should be all good. xen/arch/x86/domain.c | 4 +- xen/drivers/passthrough/io.c | 168 ++++++++++++++++++++++++++++++++++++++-- xen/drivers/passthrough/pci.c | 24 +++++-- xen/include/xen/hvm/irq.h | 2 +- xen/include/xen/pci.h | 2 +- xen/include/xen/sched.h | 6 ++ xen/include/xen/softirq.h | 3 + 7 files changed, 191 insertions(+), 18 deletions(-) Konrad Rzeszutek Wilk (1): dpci: Replace tasklet with an softirq (v4)