Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4201243ybl; Tue, 20 Aug 2019 08:23:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWLg5v8YlTybH+uYN6pSnadKhWkNruI9zId/5TI5uJWLoZ9aUBPJHbcrk8RIE5OCBCuHEV X-Received: by 2002:a17:90a:cc11:: with SMTP id b17mr549115pju.136.1566314613078; Tue, 20 Aug 2019 08:23:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566314613; cv=none; d=google.com; s=arc-20160816; b=c+6bOMrLUAmxOi2drc4Uca3JmWSRjtEpFJdQ+H87wZ26UgAVZFxg9rsP8BJEWCYy10 5b85poLe9xIVXzdz1LPpyJYpIuZGJOHWMcsl4YfKscNJyrkIsilqsXaptRXQkZPJ8nOp sVgs0YDLyJNXMbBwPQGdkC/7oiwsjEuKxgTdcQUBzQLuIdnGVcgslv1GCNgW/7opo31l MuD5C1vNB6uacJgmuU+ghoYFheSxq6HeQkLbmv01STjbULnjVzzMTrjh/HFY+Dr/7Yyb +WW4w7V9OZm2VaiTMmbiF7I/ox9AN2JGQIZlJUyz149NMz7KdkN3touooClJXc4RVK5H 7v8w== 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=Oc/y7TwL0T8A7TQOrE8yWdxaw7CqG3ysZK0wdYW4M/M=; b=xT7ysGouZtrc+R8OFz9bnWsxz2Hg80K4UOeTTSY9VEVNUKrEw+rHrtoohc4iAZ7sOd XY6anENKfsArJzGc01xbc0MG8qqJb5Ja1bR3JizKMvKjO2QYAYcqL/9sLqA+aN/jY8w0 BlJ/9280PPXIxgxY7edLLo57RpbXoNSmDq/9cLGq4cemEjWZLAMFTwc7/CjuDIPdF26r 118+C/3VgzRSPYFa+uTpDaiWsoGAoib2q7wExdtkT4dS07TGJ8yJUR/gwUqcxnz+XKrI XK6XjceXzDo72wyjH2dJWiDcIHBeNo3nTOMTYoztWiTqk/C4aGJCXb8GR5ZM29vJJCKf jHpg== 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 b61si12492324plb.401.2019.08.20.08.23.17; Tue, 20 Aug 2019 08:23:33 -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 S1730303AbfHTPWK convert rfc822-to-8bit (ORCPT + 99 others); Tue, 20 Aug 2019 11:22:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55942 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726345AbfHTPWK (ORCPT ); Tue, 20 Aug 2019 11:22:10 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6AD204DB1F; Tue, 20 Aug 2019 15:22:10 +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 E37711EC; Tue, 20 Aug 2019 15:22:09 +0000 (UTC) Date: Tue, 20 Aug 2019 09:22:09 -0600 From: Alex Williamson To: luoben 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: <20190820092209.0c89effd@x1.home> In-Reply-To: References: <20190819145150.2d30669b@x1.home> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 20 Aug 2019 15:22:10 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 20 Aug 2019 12:03:50 +0800 luoben wrote: > 在 2019/8/20 上午4:51, Alex Williamson 写道: > > 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 > > By tracing centos5u8 on host, I found it keep masking and unmasking > interrupt like this: > > [1566032533709879] index:28 irte_hi:000000010004a601 > irte_lo:adb54bc000b98001 > [1566032533711242] index:28 irte_hi:0000000000000000 > irte_lo:0000000000000000 > [1566032533711258] index:28 irte_hi:000000000004a601 > irte_lo:00003fff00ac002d > [1566032533711269] index:28 irte_hi:000000000004a601 > irte_lo:00003fff00ac002d [snip] > "[1566032533720007]" is timestamp in μs, so centos5u8 tiggers 30+ irte > modification within 10ms Ok, that matches my understanding that only very old guests behave in this manner. It's a curious case to optimize as RHEL5 is in extended life-cycle support, with regular maintenance releases ending 2+ years ago. Thanks, Alex