Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5215647ybi; Tue, 30 Jul 2019 16:19:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxef0F2+A4LScDY5Dr/rcAUCoCEyCKj8Yo1ta+HvP+FCSgOWfOQcQL5RxwbQhNg+BSZP6jC X-Received: by 2002:a65:6256:: with SMTP id q22mr110684456pgv.408.1564528755536; Tue, 30 Jul 2019 16:19:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564528755; cv=none; d=google.com; s=arc-20160816; b=lFPBjpcPctdVhIgDvYkYVFMAfYlp3raa0PsLNkM5JadCWVX60LzlP0CIkNHez91Uox tixO7zGB7czAWmjGeE+IgQrgoAxoFUMihZKq6pNyeZkT1d+fGiWZSHFs4pMF4zEtA1YO 1pc6QIPm/q3H+MzrIHMeBtLKPX2+F/upsu445CYUrURseHD2m+pmys5bB0z01dCJwHrF 1uaUSwYamsmxAod8FDA3NGyVUs9et4ag7ewKytyNMuOl0Fpv5W/BEwbdNYvw1ahQS1rr Aaz5OB9R45FcuW/The4fhWclFw3Lol1gBXhCwGfzZ8AbHMUT5JHLbwsXteznmcfPGxBT P2Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=8d2fnAS3OQ8PaLiBpAHqC1O32vTJ8VVqG3Mu89Cd9xg=; b=ArHGMFjB60LUI5ve/Jl0JxYNg6mtWVLtKc1ld17dt+aTGuOnVxwGxmuD60+YemuyC8 H+ViDES5fRbrWFf1EnPf2OmeA11mUJuvoPJ0HGf0TJBzYreUMBOMGBGsv88ZsUJc5kWi FV1Kz9BIrA66102qPk71gH+PI4VdLDaSFcXcDr9dSkfEH601nNqu8lyh0SbsbigRJcQd t2oHbiNtLmul8DnI+FzrwilVvotN0wcGk+wvmvdH/XTtbQCE4rF6MDbf2m9dshyUIqOd tjVEnfo0Q7hSIuRAOvs4rOH545tx6YAdhZfjbhqIMB/U1oPQJTOA8+5BbWDTBVGujTBW 2nhg== 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 j62si30428839pgd.170.2019.07.30.16.19.00; Tue, 30 Jul 2019 16:19:15 -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 S1728228AbfG3U0Y (ORCPT + 99 others); Tue, 30 Jul 2019 16:26:24 -0400 Received: from mail-vs1-f65.google.com ([209.85.217.65]:37955 "EHLO mail-vs1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727579AbfG3U0Y (ORCPT ); Tue, 30 Jul 2019 16:26:24 -0400 Received: by mail-vs1-f65.google.com with SMTP id k9so44524634vso.5 for ; Tue, 30 Jul 2019 13:26:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=8d2fnAS3OQ8PaLiBpAHqC1O32vTJ8VVqG3Mu89Cd9xg=; b=Wau2RAXwdBM1bkPTJWuXbM4MWOB5JrrgyAHPgE5CQaC47LuKA+/Rh+Cxo/htbZiEo7 9zVV0bw4v+xRzQCYGpovUknI0jqLmf1XTsyVEF57Ojg5Ngy7b0brO47GwZsKa3g5+BWy bWP3btwrB9GkSulcbKHQySmlLmlHu4h/CxuzJ7g0V5O411z5Qv/MvnjMnCZgDHbHQ+SO L7rvS2tEg3nYiqSHUYtAVFkg657OJDg/VcwanbikA1rFfXlWLYPox7QcsxIBT6P35g/Y No/onxBoHK/0X6ZQ0z1fcuz+2uUo91xbgVNsAnerBfGUpBvGweYWWDdHchEqvS41CC+k LgYA== X-Gm-Message-State: APjAAAWDz0bYwqp5JuA90u9WZcxEeeuyPnc7wssuOojHnNatrRkQj7hs qxeHFASitvQ5P+1rVM7t1TvYqw== X-Received: by 2002:a67:f495:: with SMTP id o21mr74811084vsn.54.1564518383217; Tue, 30 Jul 2019 13:26:23 -0700 (PDT) Received: from redhat.com (bzq-79-181-91-42.red.bezeqint.net. [79.181.91.42]) by smtp.gmail.com with ESMTPSA id t200sm28124441vke.5.2019.07.30.13.26.19 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 30 Jul 2019 13:26:22 -0700 (PDT) Date: Tue, 30 Jul 2019 16:26:17 -0400 From: "Michael S. Tsirkin" To: =?utf-8?B?5p2O6I+y?= Cc: virtio-dev@lists.oasis-open.org, linux-kernel@vger.kernel.org, Jason Wang , Pawel Moll , Suzuki K Poulose , Fam Zheng Subject: Re: [External Email] Re: [PATCH v1 0/2] virtio-mmio: support multiple interrupt vectors Message-ID: <20190730162337-mutt-send-email-mst@kernel.org> References: <20190719133135.32418-1-lifei.shirley@bytedance.com> <20190719110852-mutt-send-email-mst@kernel.org> <20190722043707-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 22, 2019 at 09:43:18PM +0800, 李菲 wrote: > On Mon, Jul 22, 2019 at 4:39 PM Michael S. Tsirkin wrote: > > > > On Mon, Jul 22, 2019 at 11:22:02AM +0800, 李菲 wrote: > > > On Fri, Jul 19, 2019 at 11:14 PM Michael S. Tsirkin wrote: > > > > > > > > On Fri, Jul 19, 2019 at 09:31:33PM +0800, Fei Li wrote: > > > > > Hi, > > > > > > > > > > This patch series implements multiple interrupt vectors support for > > > > > virtio-mmio device. This is especially useful for multiqueue vhost-net > > > > > device when using firecracker micro-vms as the guest. > > > > > > > > > > Test result: > > > > > With 8 vcpus & 8 net queues set, one vhost-net device with 8 irqs can > > > > > receive 9 times more pps comparing with only one irq: > > > > > - 564830.38 rxpck/s for 8 irqs on > > > > > - 67665.06 rxpck/s for 1 irq on > > > > > > > > > > Please help to review, thanks! > > > > > > > > > > Have a nice day > > > > > Fei > > > > > > > > > > > > Interesting. The spec says though: > > > > > > > > 4.2.3.4 > > > > Notifications From The Device > > > > The memory mapped virtio device is using a single, dedicated interrupt signal, which is asserted when at > > > > least one of the bits described in the description of InterruptStatus is set. This is how the device sends a > > > > used buffer notification or a configuration change notification to the device. > > > > > > > Yes, the spec needs to be updated if we want to use mult-irqs. > > > > > > > > So I'm guessing we need to change the host/guest interface? > > > Just to confirm, does the "the host/guest interface" you mentioned mean how to > > > pass the irq information from the user space tool to guest kernel? > > > In this patch, we do this by passing the [irq_start, irq_end] > > > interface via setting guest > > > kernel command line, that is done in vm_cmdline_set(). > > > Also there is another way to do this: add two new registers describing irq info > > > (irq_start & irq_end OR irq_start & irq_numbers) to the virtio config space. > > > > > > Which one do you prefer? > > > > I'm not sure - so far irq was passed on the command line, right? > Yes. > > > > The first step in implementing any spec change would be to update qemu > > code to virtio 1. Which is not a huge project but so far no one > > bothered. > Emm, actually I only did the test with using firecracker to start a > micro-vm, but without qemu. > To be honest, the reason why implementing multi-irq on virtio-mmio is > mainly because the > current firecracker using virtio-mmio device and it has no pci thing, > thus no msi/msix to > handle the interruptions. > On the other hand, considering pci is well supported in qemu, I am > wondering whether we > still need this. If needed, we would like to do this. :) > > Have a nice day, thanks > Fei Sergio Lopez is now working on updating mmio to v1 support in qemu. Maybe get in touch with him on how he looks at this extension. Not asking you to work on qemu, but it makes sense to get an ack for guest bits from another popular hypervisor. > > > > > > > > If true pls cc virtio-dev. > > > Sure. > > > > > > > > Also, do we need to update dt bindings documentation? > > > You mean the following doc? Sure. :) > > > https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/virtio/mmio.txt > > > > > > Thanks for the review! > > > > > > Have a nice day > > > Fei > > > > > > > > > > > > > > > > > > > > Fam Zheng (1): > > > > > virtio-mmio: Process vrings more proactively > > > > > > > > > > Fei Li (1): > > > > > virtio-mmio: support multiple interrupt vectors > > > > > > > > > > drivers/virtio/virtio_mmio.c | 238 +++++++++++++++++++++++++++++++++++-------- > > > > > 1 file changed, 196 insertions(+), 42 deletions(-) > > > > > > > > > > -- > > > > > 2.11.0