Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp6755242ybh; Thu, 8 Aug 2019 05:13:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqzHrb/ieuoBUmnIeRyK+JgrsaJRMnQjQtnx9avyxuXtW/hFjz3Vina4A1AD1q52aIDiW/Xi X-Received: by 2002:a17:902:e20c:: with SMTP id ce12mr13879618plb.130.1565266419429; Thu, 08 Aug 2019 05:13:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565266419; cv=none; d=google.com; s=arc-20160816; b=Z7UozCaE0fUKSwvzck9Q+qqLWzmYJsrpsxu+6e9wtzVa9YX/0Kc02uzp/euLIkBKcZ ke3T0qwORrFL4Sn0JIIMzntlf1prhi+BzaAeJ2OdpXkyREgj07AaM68mCzlF25TE/PDM kvSTy02JnxtpyPa0HV8p355Bf5XdUKaNMEMo0nQOJcxd7TKD1Ia+B5GRW8KQ98dhuXMN jQMvOaGxeUm+A8dJ3upgkLDQMB5uk5C0BAa1SDZGCo4eWvD1f06xvDRN692uhxIweh2Y tZv2P+6BXOHjQ/4ajczbzK9Rtu5t9DIf1bDW2CDXIksUZ5adIlbQrrmZy12/H/22QRmE 5G3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=3hQUublUGDShz6RFMOK7ObczOdU8CllO1jDtPRMsabU=; b=gluZfAhswED8KfDS4i9cDa8I1clU1l4ML4sam7AEUNrFFLh1/xAPNYJQ+t1sugfL7+ JLxzcqg0NBVPj5zn3voyNrYRNzVscFIjEJjQi93nn3RYl4ZlR1DeCXHMUWbOZaiyzIHJ 9AiXQvY+mBJRKHOxhwpn7OeKVcdXV7OrEwNNZPRBbgxM9wzYhP6m/YdJ2nJ0LGRa0gZo 81cscpYCVMSvTbBTpOLG1yVwKvRxTidG/zvKjItd+BcioExnhVkfJmCwlA+dbQPCw0ZW n0rj1QZdhJHE0XdWJkEd5kZgfatkqvtuNaZvPMXfLq8T/M9bjlGfdUBQaPvVBI/eza56 PsTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d27si17841437pgb.166.2019.08.08.05.13.23; Thu, 08 Aug 2019 05:13:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728683AbfHHMGh (ORCPT + 99 others); Thu, 8 Aug 2019 08:06:37 -0400 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:39621 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726156AbfHHMGh (ORCPT ); Thu, 8 Aug 2019 08:06:37 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R481e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04391;MF=luoben@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0TYxvm0-_1565265986; Received: from localhost(mailfrom:luoben@linux.alibaba.com fp:SMTPD_---0TYxvm0-_1565265986) by smtp.aliyun-inc.com(127.0.0.1); Thu, 08 Aug 2019 20:06:34 +0800 From: Ben Luo To: tglx@linutronix.de, alex.williamson@redhat.com, linux-kernel@vger.kernel.org Cc: tao.ma@linux.alibaba.com, gerry@linux.alibaba.com Subject: [PATCH 0/2] introduce update_irq_devid and optimize VFIO irq ops Date: Thu, 8 Aug 2019 20:07:30 +0800 Message-Id: X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, VFIO takes a lot of free-then-request-irq actions whenever a VM (with device passthru via VFIO) sets irq affinity or mask/unmask irq. Those actions only change the cookie data of irqaction or even change nothing. The free-then-request-irq not only add more latency, but also increases the risk of losing interrupt, this may lead to a VM hung forever in waiting IO completion This patchset solved this issue by: patch 1 introduces update_irq_devid to only update dev_id of irqaction patch 2 make use of update_irq_devid and optimize irq operations in VFIO Ben Luo (2): genirq: introduce update_irq_devid() vfio_pci: make use of update_irq_devid and optimize irq ops drivers/vfio/pci/vfio_pci_intrs.c | 100 +++++++++++++++++++++++--------------- include/linux/interrupt.h | 3 ++ kernel/irq/manage.c | 74 ++++++++++++++++++++++++++++ 3 files changed, 139 insertions(+), 38 deletions(-) -- 1.8.3.1