virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Christoph Hellwig <hch@lst.de>, mst@redhat.com
Cc: axboe@kernel.dk, pbonzini@redhat.com,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH 1/9] virtio_pci: remove struct virtio_pci_vq_info
Date: Tue, 7 Feb 2017 15:17:02 +0800	[thread overview]
Message-ID: <c9ce2425-aabb-6b05-2d00-d92ede6b18bf@redhat.com> (raw)
In-Reply-To: <20170205171526.6224-2-hch@lst.de>



On 2017年02月06日 01:15, Christoph Hellwig wrote:
> We don't really need struct virtio_pci_vq_info, as most field in there
> are redundant:
>
>   - the vq backpointer is not strictly neede to start with
>   - the entry in the vqs list is not needed - the generic virtqueue already
>     has list, we only need to check if it has a callback to get the same
>     semantics
>   - we can use a simple array to look up the MSI-X vec if needed.
>   - That simple array now also duoble serves to replace the per_vq_vectors
>     flag
>
> Signed-off-by: Christoph Hellwig<hch@lst.de>
> ---
>   drivers/virtio/virtio_pci_common.c | 117 +++++++++++--------------------------
>   drivers/virtio/virtio_pci_common.h |  25 +-------
>   drivers/virtio/virtio_pci_legacy.c |   6 +-
>   drivers/virtio/virtio_pci_modern.c |   6 +-
>   4 files changed, 39 insertions(+), 115 deletions(-)
>
> diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c
> index 186cbab327b8..a33767318cbf 100644
> --- a/drivers/virtio/virtio_pci_common.c
> +++ b/drivers/virtio/virtio_pci_common.c
> @@ -62,16 +62,13 @@ static irqreturn_t vp_config_changed(int irq, void *opaque)
>   static irqreturn_t vp_vring_interrupt(int irq, void *opaque)
>   {
>   	struct virtio_pci_device *vp_dev = opaque;
> -	struct virtio_pci_vq_info *info;
>   	irqreturn_t ret = IRQ_NONE;
> -	unsigned long flags;
> +	struct virtqueue *vq;
>   
> -	spin_lock_irqsave(&vp_dev->lock, flags);
> -	list_for_each_entry(info, &vp_dev->virtqueues, node) {
> -		if (vring_interrupt(irq, info->vq) == IRQ_HANDLED)
> +	list_for_each_entry(vq, &vp_dev->vdev.vqs, list) {
> +		if (vq->callback && vring_interrupt(irq, vq) == IRQ_HANDLED)
>   			ret = IRQ_HANDLED;
>   	}

The check is still there.

Thanks
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  reply	other threads:[~2017-02-07  7:17 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170205171526.6224-1-hch@lst.de>
2017-02-05 17:15 ` [PATCH 1/9] virtio_pci: remove struct virtio_pci_vq_info Christoph Hellwig
2017-02-07  7:17   ` Jason Wang [this message]
2017-02-07  9:38     ` Christoph Hellwig
2017-02-08  2:52       ` Jason Wang
2017-02-05 17:15 ` [PATCH 2/9] virtio_pci: use shared interrupts for virtqueues Christoph Hellwig
2017-02-07  7:17   ` Jason Wang
2017-02-05 17:15 ` [PATCH 3/9] virtio_pci: don't duplicate the msix_enable flag in struct pci_dev Christoph Hellwig
2017-02-05 17:15 ` [PATCH 4/9] virtio_pci: simplify MSI-X setup Christoph Hellwig
2017-02-05 17:15 ` [PATCH 5/9] virtio: allow drivers to request IRQ affinity when creating VQs Christoph Hellwig
2017-02-05 17:15 ` [PATCH 6/9] virtio: provide a method to get the IRQ affinity mask for a virtqueue Christoph Hellwig
2017-02-05 17:15 ` [PATCH 7/9] blk-mq: provide a default queue mapping for virtio device Christoph Hellwig
2017-02-05 17:15 ` [PATCH 8/9] virtio_blk: use virtio IRQ affinity Christoph Hellwig
2017-02-05 17:15 ` [PATCH 9/9] virtio_scsi: " Christoph Hellwig
2017-02-09 13:50 ` automatic IRQ affinity for virtio V3 Christoph Hellwig
2017-02-09 16:01   ` Michael S. Tsirkin
2017-02-27  8:48     ` Christoph Hellwig
2017-02-27 18:45       ` Michael S. Tsirkin
2017-02-27 18:49         ` Michael S. Tsirkin
2017-01-27  8:16 automatic IRQ affinity for virtio V2 Christoph Hellwig
2017-01-27  8:16 ` [PATCH 1/9] virtio_pci: remove struct virtio_pci_vq_info Christoph Hellwig
2017-02-03  7:54   ` Jason Wang
     [not found]   ` <a5568074-d92e-8322-6955-19c640006fda@redhat.com>
2017-02-03  8:22     ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c9ce2425-aabb-6b05-2d00-d92ede6b18bf@redhat.com \
    --to=jasowang@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).