Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3192183ybl; Mon, 19 Aug 2019 13:54:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxBmanHlkSOvGGyNnENhOfON+cPIkFma/8gTbUXHcqNg3nrcq84X8ZEdCRLOcm7Ernz2iBy X-Received: by 2002:a17:90a:dc82:: with SMTP id j2mr23337510pjv.89.1566248068296; Mon, 19 Aug 2019 13:54:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566248068; cv=none; d=google.com; s=arc-20160816; b=oD7y8EZmTf1KZzw0d49RJ65/t30VvfyxXoIv6XWy9E0nVDvfDY/boff7nY65bwXVYr /5FvWPBsnZ0Otkfgu7AtDFc0kcgkM5F8eAeSs9Uk7dxywucgbVAo5lEZ0bjYQ2VTrLNF C7Py4jGMH8IW+z1AFbSq3t+yyYF/A+9ktVp+T7vhPkn+M6uPrkCXZaESz1Oz4UAeLtfO Vtrm7+TuGFVIpQrhduUsMUPMuZbyRmAllDIRzFA9CV5qWP1V++UPTVwm9Hq56KAsM+ED 2+BoArbWVc3SwguZDjU8icpoHoQbLTbzdALdsNZkk+CLVkSJSOSTceN3tL+x95Wips7K 7AFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=FhELPe3x7ur6P1Udu0kjxze+4mddpOriDZtIMRgyLak=; b=pO+Xdtl7h7PIZnktQccYW5ZuIC4IhBT68G+IfnU14czyH59Cs6pOPKivCoaK1ychvH ej71I0dSBQvBkmKObaubQqOz0qZi/DOlrHhQuxJeh92qD3RMhUbOndAxCGyi15S8U+3T vYLTNMBKhOgoO3M5p2q39brX8Df60IaH3O9fRxQFTdvQ7UqnqoJR89DbKx3wXCwzb26b WaUiQEbESAAwpnHHCwN/kdYcSV6p7UQ8Dj5rYGDuCn+ebCyeS/I1VK3tBOlLnadHNHnw 8DEdZ5bbhgfj5PBYivKzObZay09cYfeAFc5pOHcSdxK1d9jR9AVJ3QS/cRMaENeoSwf9 Vngw== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m15si11282594pff.267.2019.08.19.13.54.13; Mon, 19 Aug 2019 13:54:28 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728463AbfHSUwG (ORCPT + 99 others); Mon, 19 Aug 2019 16:52:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33602 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727971AbfHSUwG (ORCPT ); Mon, 19 Aug 2019 16:52:06 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DE54111A06; Mon, 19 Aug 2019 20:51:59 +0000 (UTC) Received: from x1.home (ovpn-116-99.phx2.redhat.com [10.3.116.99]) by smtp.corp.redhat.com (Postfix) with ESMTP id 31BEA52CE; Mon, 19 Aug 2019 20:51:55 +0000 (UTC) Date: Mon, 19 Aug 2019 14:51:50 -0600 From: Alex Williamson To: Ben Luo Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, tao.ma@linux.alibaba.com, gerry@linux.alibaba.com, nanhai.zou@linux.alibaba.com, linyunsheng@huawei.com Subject: Re: [PATCH v3 0/3] genirq/vfio: Introduce update_irq_devid and optimize VFIO irq ops Message-ID: <20190819145150.2d30669b@x1.home> In-Reply-To: References: Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 19 Aug 2019 20:52:06 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 15 Aug 2019 21:02:58 +0800 Ben Luo wrote: > 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 adds more latency, > but also increases the risk of losing interrupt, which may lead to a > VM hung forever in waiting for IO completion What guest environment is generating this? Typically I don't see that Windows or Linux guests bounce the interrupt configuration much. Thanks, Alex > > This patchset solved the issue by: > Patch 2 introduces update_irq_devid to only update dev_id of irqaction > Patch 3 make use of update_irq_devid and optimize irq operations in VFIO > > changes from v2: > - reformat to avoid quoted string split across lines and etc. > > changes from v1: > - add Patch 1 to enhance error recovery etc. in free irq per tglx's comments > - enhance error recovery code and debugging info in update_irq_devid > - use __must_check in external referencing of update_irq_devid > - use EXPORT_SYMBOL_GPL for update_irq_devid > - reformat code of patch 3 for better readability > > Ben Luo (3): > genirq: enhance error recovery code in free irq > genirq: introduce update_irq_devid() > vfio_pci: make use of update_irq_devid and optimize irq ops > > drivers/vfio/pci/vfio_pci_intrs.c | 101 +++++++++++++++++++++------------- > include/linux/interrupt.h | 3 ++ > kernel/irq/manage.c | 110 +++++++++++++++++++++++++++++++++----- > 3 files changed, 164 insertions(+), 50 deletions(-) >