search for: irq_affin

Displaying 20 results from an estimated 100 matches for "irq_affin".

2017 Mar 29
2
[PATCH 2/6] virtio: add context flag to find vqs
...callback, name); if (!vq) { err = -ENOMEM; @@ -374,7 +375,8 @@ static struct virtqueue *vop_find_vq(struct virtio_device *dev, static int vop_find_vqs(struct virtio_device *dev, unsigned nvqs, struct virtqueue *vqs[], vq_callback_t *callbacks[], - const char * const names[], struct irq_affinity *desc) + const char * const names[], const bool *ctx, + struct irq_affinity *desc) { struct _vop_vdev *vdev = to_vopvdev(dev); struct vop_device *vpdev = vdev->vpdev; @@ -388,7 +390,8 @@ static int vop_find_vqs(struct virtio_device *dev, unsigned nvqs, for (i = 0; i < nvqs; ++i)...
2017 Mar 29
2
[PATCH 2/6] virtio: add context flag to find vqs
...callback, name); if (!vq) { err = -ENOMEM; @@ -374,7 +375,8 @@ static struct virtqueue *vop_find_vq(struct virtio_device *dev, static int vop_find_vqs(struct virtio_device *dev, unsigned nvqs, struct virtqueue *vqs[], vq_callback_t *callbacks[], - const char * const names[], struct irq_affinity *desc) + const char * const names[], const bool *ctx, + struct irq_affinity *desc) { struct _vop_vdev *vdev = to_vopvdev(dev); struct vop_device *vpdev = vdev->vpdev; @@ -388,7 +390,8 @@ static int vop_find_vqs(struct virtio_device *dev, unsigned nvqs, for (i = 0; i < nvqs; ++i)...
2017 Jan 27
0
[PATCH 5/9] virtio: allow drivers to request IRQ affinity when creating VQs
Add a struct irq_affinity pointer to the find_vqs methods, which if set is used to tell the PCI layer to create the MSI-X vectors for our I/O virtqueues with the proper affinity from the start. Compared to after the fact affinity hints this gives us an instantly working setup and allows to allocate the irq descritors no...
2023 Mar 28
0
[PATCH v4 03/11] virtio-vdpa: Support interrupt affinity spreading mechanism
...> > > > > > > > > Thinking hard of all the logics, I think I've found something interesting. > > > > > > > > > > > > Commit ad71473d9c437 ("virtio_blk: use virtio IRQ affinity") tries to > > > > > > pass irq_affinity to transport specific find_vqs(). This seems a > > > > > > layer violation since driver has no knowledge of > > > > > > > > > > > > 1) whether or not the callback is based on an IRQ > > > > > > 2) whether or not the device...
2023 Mar 28
0
[PATCH v4 03/11] virtio-vdpa: Support interrupt affinity spreading mechanism
...> > > > > Signed-off-by: Xie Yongji <xieyongji at bytedance.com> > > > > Thinking hard of all the logics, I think I've found something interesting. > > > > Commit ad71473d9c437 ("virtio_blk: use virtio IRQ affinity") tries to > > pass irq_affinity to transport specific find_vqs(). This seems a > > layer violation since driver has no knowledge of > > > > 1) whether or not the callback is based on an IRQ > > 2) whether or not the device is a PCI or not (the details are hided by > > the transport driver) > &...
2019 Jan 03
4
[PATCH 0/2] virtio: virtio_config_ops documentation
After the latest virtio-balloon changes, it became clear that it is not obvious that some of the virtio operations (e.g. reading or writing the config space) cannot be done from an atomic context for all transports. At least try to document that, and also fix some inconsistencies I noticed along the way. Cornelia Huck (2): virtio: fix virtio_config_ops description virtio: document
2019 Jan 03
4
[PATCH 0/2] virtio: virtio_config_ops documentation
After the latest virtio-balloon changes, it became clear that it is not obvious that some of the virtio operations (e.g. reading or writing the config space) cannot be done from an atomic context for all transports. At least try to document that, and also fix some inconsistencies I noticed along the way. Cornelia Huck (2): virtio: fix virtio_config_ops description virtio: document
2023 Mar 28
0
[PATCH v4 05/11] vduse: Support set_vq_affinity callback
...fine IRQ_UNBOUND -1 > + > struct vduse_virtqueue { > u16 index; > u16 num_max; > @@ -57,6 +59,8 @@ struct vduse_virtqueue { > struct vdpa_callback cb; > struct work_struct inject; > struct work_struct kick; > + int irq_effective_cpu; > + struct cpumask irq_affinity; > }; > > struct vduse_dev; > @@ -128,6 +132,7 @@ static struct class *vduse_class; > static struct cdev vduse_ctrl_cdev; > static struct cdev vduse_cdev; > static struct workqueue_struct *vduse_irq_wq; > +static struct workqueue_struct *vduse_irq_bound_wq; &...
2019 Jul 02
2
[PATCH] virtio-mmio: add error check for platform_get_irq
...deletion(-) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index f363fbeb5ab0..60dde8ed163b 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -463,9 +463,14 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct irq_affinity *desc) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); - unsigned int irq = platform_get_irq(vm_dev->pdev, 0); + int irq = platform_get_irq(vm_dev->pdev, 0); int i, err, queue_idx = 0; + if (irq < 0) { + dev_err(&vdev->dev, "no IRQ resource defined...
2019 Jul 02
2
[PATCH] virtio-mmio: add error check for platform_get_irq
...deletion(-) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index f363fbeb5ab0..60dde8ed163b 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -463,9 +463,14 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct irq_affinity *desc) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); - unsigned int irq = platform_get_irq(vm_dev->pdev, 0); + int irq = platform_get_irq(vm_dev->pdev, 0); int i, err, queue_idx = 0; + if (irq < 0) { + dev_err(&vdev->dev, "no IRQ resource defined...
2019 Jul 02
2
[PATCH v2] virtio-mmio: add error check for platform_get_irq
...deletion(-) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index f363fbeb5ab0..e09edb5c5e06 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -463,9 +463,14 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct irq_affinity *desc) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); - unsigned int irq = platform_get_irq(vm_dev->pdev, 0); + int irq = platform_get_irq(vm_dev->pdev, 0); int i, err, queue_idx = 0; + if (irq < 0) { + dev_err(&vdev->dev, "Cannot get IRQ resource...
2019 Jul 02
2
[PATCH v2] virtio-mmio: add error check for platform_get_irq
...deletion(-) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index f363fbeb5ab0..e09edb5c5e06 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -463,9 +463,14 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct irq_affinity *desc) { struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev); - unsigned int irq = platform_get_irq(vm_dev->pdev, 0); + int irq = platform_get_irq(vm_dev->pdev, 0); int i, err, queue_idx = 0; + if (irq < 0) { + dev_err(&vdev->dev, "Cannot get IRQ resource...
2016 Nov 17
13
automatic IRQ affinity for virtio
Hi Michael, this series contains a couple cleanups for the virtio_pci interrupt handling code, including a switch to the new pci_irq_alloc_vectors helper, and support for automatic affinity by the PCI layer if the consumers ask for it. It then converts over virtio_blk to use this functionality so that it's blk-mq queues are aligned to the MSI-X vector routing. I have a similar patch in the
2016 Nov 17
13
automatic IRQ affinity for virtio
Hi Michael, this series contains a couple cleanups for the virtio_pci interrupt handling code, including a switch to the new pci_irq_alloc_vectors helper, and support for automatic affinity by the PCI layer if the consumers ask for it. It then converts over virtio_blk to use this functionality so that it's blk-mq queues are aligned to the MSI-X vector routing. I have a similar patch in the
2017 Jan 27
15
automatic IRQ affinity for virtio V2
Hi Michael, hi Jason, This patches applies a few cleanups to the virtio PCI interrupt handling code, and then converts the virtio PCI code to use the automatic MSI-X vectors spreading, as well as using the information in virtio-blk and virtio-scsi to automatically align the blk-mq queues to the MSI-X vectors. Changes since V1: - dropped the patches already merged for 4.10-rc - new patch to
2017 Jan 27
15
automatic IRQ affinity for virtio V2
Hi Michael, hi Jason, This patches applies a few cleanups to the virtio PCI interrupt handling code, and then converts the virtio PCI code to use the automatic MSI-X vectors spreading, as well as using the information in virtio-blk and virtio-scsi to automatically align the blk-mq queues to the MSI-X vectors. Changes since V1: - dropped the patches already merged for 4.10-rc - new patch to
2019 Jan 03
1
[PATCH 2/2] virtio: document virtio_config_ops restrictions
...onfig.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h > index 7087ef946ba7..987b6491b946 100644 > --- a/include/linux/virtio_config.h > +++ b/include/linux/virtio_config.h > @@ -12,6 +12,11 @@ struct irq_affinity; > > /** > * virtio_config_ops - operations for configuring a virtio device > + * Note: Do not assume that a transport implements all of the operations > + * getting/setting a value as a simple read/write! Generally speaking, > + * any of @get/@set, @get_status...
2019 Oct 14
1
[PATCH V3 6/7] virtio: introduce a mdev based transport
...o_mdev_vq_info? Please document the actual type in a comment. > +static int virtio_mdev_find_vqs(struct virtio_device *vdev, unsigned nvqs, > + struct virtqueue *vqs[], > + vq_callback_t *callbacks[], > + const char * const names[], > + const bool *ctx, > + struct irq_affinity *desc) > +{ > + struct virtio_mdev_device *vm_dev = to_virtio_mdev_device(vdev); > + struct mdev_device *mdev = vm_get_mdev(vdev); > + const struct virtio_mdev_device_ops *ops = mdev_get_dev_ops(mdev); > + struct virtio_mdev_callback cb; > + int i, err, queue_idx = 0; > + &g...
2020 Aug 19
0
[PATCH v3 03/18] virtio: Add get_shm_region method
...ude/linux/virtio_config.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index 8fe857e27ef3..4b8e38c5c4d8 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h @@ -11,6 +11,11 @@ struct irq_affinity; +struct virtio_shm_region { + u64 addr; + u64 len; +}; + /** * virtio_config_ops - operations for configuring a virtio device * Note: Do not assume that a transport implements all of the operations @@ -66,6 +71,7 @@ struct irq_affinity; * the caller can then copy. * @set_vq_affi...
2023 Mar 16
0
[PATCH v3 03/11] vdpa: Add set_irq_affinity callback in vdpa_config_ops
On Tue, Feb 28, 2023 at 5:42?PM Xie Yongji <xieyongji at bytedance.com> wrote: > > This introduces set_irq_affinity callback in > vdpa_config_ops so that vdpa device driver can > get the interrupt affinity hint from the virtio > device driver. The interrupt affinity hint would > be needed by the interrupt affinity spreading > mechanism. > > Signed-off-by: Xie Yongji <xieyongji at byted...