Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5525848ybi; Tue, 30 Jul 2019 22:45:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqxsHMsBOtSZOele/6gFsP1bFIbDoWq4IdeKbQgLlhRJFK1zsXcU1GKc4ig63JLNlkx+oJKQ X-Received: by 2002:a62:7641:: with SMTP id r62mr45206706pfc.35.1564551905127; Tue, 30 Jul 2019 22:45:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564551905; cv=none; d=google.com; s=arc-20160816; b=VxjNfo0KBOpBaJKXSwEEJB+V3D2EOsHPzPtusRLqqcsayAW126T3CJjp7KH3hcNOPC kOwq6wnmobOL9mbZ2i7XRqB9mM1QVnkb2U6t7OdtQbsdAJz789hRkAz75mTfqTLqqDBi ckd1ZsSjA8Nl1KN8vpFgjARrspl391lKM3cFTX1Zxexe1tTFLhsiQdPfc0Q5VHZ5WFiE FEOmeL4r7vkkOJiMTIUjwTZwD9wX+yaHIVPI/AosaDsmnljN4QUO21r6/q6QOC7MTT6A X/WqTFEEdeVS7Tv3+TnRvVkAInZ7u/PTnE0PpdyqdvqIpEG79eU+8yhJiIV8p5PZWsmV BtFA== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=B43FLrEVogj/kc4jOi+o2UmeNa0dyjJfYgWWXRm95cM=; b=rPA/6NKlPWMGQsM37YBsaqsKln/od8nb0upDXeDV1rffaUSAwbkqSiouaSH9Tf5hAy GhNg6RVeBQKo76W8q1eKu8f6VydGir5V1N/3P/GGBS9d2OHZnNOT3a89knjdRUWfojsV LDhckxlGl4hotQbyV4r6GbGDdsrNojErJGLCSjUorQ/f2O7ujoYigjT7JDn+dKjw3wYw fIZNBj38hOMCGeKjsA0S4eakGFaztaPv7A1hOT+KGrH9snehdU9fXxc61I40LTzs74n8 HTMXfIR1+nKfYM/6iemy0wvpoAEcJhADoch6/AcpEqboEc9Y4/9qHFYzpyMtBdPl0RA2 DNJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=W7FDhyZk; 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=bytedance.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u20si28572558plq.421.2019.07.30.22.44.50; Tue, 30 Jul 2019 22:45:05 -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; dkim=pass header.i=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=W7FDhyZk; 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=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726313AbfGaEE7 (ORCPT + 99 others); Wed, 31 Jul 2019 00:04:59 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:45485 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725916AbfGaEE7 (ORCPT ); Wed, 31 Jul 2019 00:04:59 -0400 Received: by mail-lj1-f194.google.com with SMTP id m23so64108406lje.12 for ; Tue, 30 Jul 2019 21:04:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=B43FLrEVogj/kc4jOi+o2UmeNa0dyjJfYgWWXRm95cM=; b=W7FDhyZkAOOFAaEizlcXpuDUQhD02SbIndufT4uif6J8qZ2XLhurGCwQJinCZLxvwV BcmU0MF9pjz5JMvelyQv9ywe4dpQFiz73lMVP/thvergFZYLKTqmdJxWV2WqkADZ6ZEo kbxkEzqsJNTJjUXTf/jPU9KCTZZmgYAMTxc4XS8GtldWhHRXwm9KFOvUfOTapuwmRiBt qpEvvC41R5qOmMYUiI/+wYkNqDsF9YxXzZ18uKabDZKKWXoUIG8uhiS0xZP+FClH2d/v BD7U+hhfBXdzbOaJFiTnzNDTrUWwYI64kSU0y8gamlKm/fqgCQ+K2Tb/LhCYE4+Bqd/M DQtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=B43FLrEVogj/kc4jOi+o2UmeNa0dyjJfYgWWXRm95cM=; b=B4CqEt4Yu34WvMlFz2meEV8JiaSSYR1Uxq9lUFbcT8rVpuIG5xA/CDxhxFsAnu1JAr c7EH3YYp+I0mggKUPs2yq2O94ViKAg3p+ExZoMAOxDbdFXu/mFP+rbqkrFvXAN0x6jxA zgHNRaKugEUd6PWPRGMUJ3wmcFt2qOOxHl7zYyHwo7QLV2js1TOUbddZ4VQ2U7sjHLiD wyChBYmOH3+yrNRrdTuP/6j/M4F/R1A53o8OAQZw9yD07smorI3WRGf44Pf3RBvsFwIc 1IONjIy7oR7RFCcQIAx/Wf9mASI8IFzRyM4gCHdPVjVfo7xvnPz6I2ZyJXfUKT/sjO66 cUog== X-Gm-Message-State: APjAAAUWPglM91m7/5e952UiiDmkODVRUcOIEpWnkn05PBwhkqNccuz/ MqvdCD/r0gQ562LLvm6alq1ZsMMSO6tNnkTtcWHWQg== X-Received: by 2002:a05:651c:1105:: with SMTP id d5mr19034283ljo.161.1564545896415; Tue, 30 Jul 2019 21:04:56 -0700 (PDT) MIME-Version: 1.0 References: <20190719133135.32418-1-lifei.shirley@bytedance.com> <20190719110852-mutt-send-email-mst@kernel.org> <20190722043707-mutt-send-email-mst@kernel.org> <20190730162337-mutt-send-email-mst@kernel.org> In-Reply-To: <20190730162337-mutt-send-email-mst@kernel.org> From: =?UTF-8?B?5p2O6I+y?= Date: Wed, 31 Jul 2019 12:04:45 +0800 Message-ID: Subject: Re: [External Email] Re: [PATCH v1 0/2] virtio-mmio: support multiple interrupt vectors To: "Michael S. Tsirkin" , Sergio Lopez Cc: virtio-dev@lists.oasis-open.org, linux-kernel@vger.kernel.org, Jason Wang , Pawel Moll , Suzuki K Poulose , Fam Zheng , Xiongchun Duan Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 31, 2019 at 4:26 AM Michael S. Tsirkin wrote: > > On Mon, Jul 22, 2019 at 09:43:18PM +0800, =E6=9D=8E=E8=8F=B2 wrote: > > On Mon, Jul 22, 2019 at 4:39 PM Michael S. Tsirkin wro= te: > > > > > > On Mon, Jul 22, 2019 at 11:22:02AM +0800, =E6=9D=8E=E8=8F=B2 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 vh= ost-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 ir= qs 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, dedica= ted interrupt signal, which is asserted when at > > > > > least one of the bits described in the description of Int= erruptStatus is set. This is how the device sends a > > > > > used buffer notification or a configuration change notifi= cation 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 describ= ing irq info > > > > (irq_start & irq_end OR irq_start & irq_numbers) to the virtio conf= ig 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 qem= u > > > 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. Thanks for the info! :) Hi Sergio Lopez, I saw your [virtio-mmio: modern (v2)] patch series in Qemu mailing list, thanks for moving this on. And long Story Short, these two kernel patches is to add the multi-irq support for virtio-mmio driver. As this involves the spec change and you are now implementing virtio-mmio v2, could you help to give some suggestions on this extension? I will cc you the original patch soon, thanks. > Not asking you to work on qemu, but it makes sense > to get an ack for guest bits from another popular hypervisor. I agree, absolutely right. And I once work on Qemu development, hope the combined background could help to move this multi-irq feature forward. :) Have a nice day, many thanks Fei > > > > > > > > > > > > > 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/devicet= ree/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