Displaying 20 results from an estimated 37 matches for "idr_destroy".
Did you mean:
ida_destroy
2015 Sep 17
0
DEFINE_IDA causing memory leaks? (was Re: [PATCH 1/2] virtio: fix memory leak of virtio ida cache layers)
...r. Tejun, would
> that work?
Yeah, that definitely is one way to go about it. It kinda muddles the
purpose of ida_destroy() tho. I suppose we can rename it to
idr_remove_all() and then do the same to idr. I'm not particularly
objecting to all that but what's wrong with just calling idr_destroy()
on exit paths? If missing the call in modules is an issue, maybe we
can just annotate idr/ida with debugobj?
Thanks.
--
tejun
2015 Sep 17
7
[PATCH 0/2] Fix memory leaks in virtio & remoteproc cores
Hi,
The following patches fix couple of memory leaks in the virtio and
remoteproc cores when using these as modules, and going through a
cycle of insmod and rmmod with at least a device registered with
the corresponding cores in between. I ran into this on our downstream
product kernels on both 3.14 and 4.1 based kernels, and should apply
to the latest kernel as well.
Patches can be picked up
2015 Sep 17
7
[PATCH 0/2] Fix memory leaks in virtio & remoteproc cores
Hi,
The following patches fix couple of memory leaks in the virtio and
remoteproc cores when using these as modules, and going through a
cycle of insmod and rmmod with at least a device registered with
the corresponding cores in between. I ran into this on our downstream
product kernels on both 3.14 and 4.1 based kernels, and should apply
to the latest kernel as well.
Patches can be picked up
2018 May 16
0
[RFC v4 3/5] virtio_ring: add packed ring support
...gs_shadow = 0;
+ idr_init(&vq->buffer_id);
} else {
vq->vring = vring.vring_split;
vq->avail_flags_shadow = 0;
@@ -1384,6 +1853,8 @@ void vring_del_virtqueue(struct virtqueue *_vq)
(void *)vq->vring.desc,
vq->queue_dma_addr);
}
+ if (vq->packed)
+ idr_destroy(&vq->buffer_id);
list_del(&_vq->list);
kfree(vq);
}
--
2.17.0
2019 Sep 10
1
[RFC PATCH 4/4] docs: Sample driver to demonstrate how to implement virtio-mdev framework
..._destroy(mvnet_dev.vd_class);
> +
> +failed1:
> +all_done:
> + return ret;
> +}
> +
> +static void __exit mvnet_dev_exit(void)
> +{
> + mvnet_dev.dev.bus = NULL;
> + mdev_unregister_device(&mvnet_dev.dev);
> +
> + device_unregister(&mvnet_dev.dev);
> + idr_destroy(&mvnet_dev.vd_idr);
> + class_destroy(mvnet_dev.vd_class);
> + mvnet_dev.vd_class = NULL;
> + pr_info("mvnet_dev: Unloaded!\n");
> +}
> +
> +module_init(mvnet_dev_init)
> +module_exit(mvnet_dev_exit)
> +
> +MODULE_LICENSE("GPL v2");
> +MODULE_IN...
2019 Nov 05
0
[PATCH V8 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework
...ed3:
+
+ device_unregister(&mvnet_dev.dev);
+failed2:
+ class_destroy(mvnet_dev.vd_class);
+
+failed1:
+all_done:
+ return ret;
+}
+
+static void __exit mvnet_dev_exit(void)
+{
+ mvnet_dev.dev.bus = NULL;
+ mdev_unregister_device(&mvnet_dev.dev);
+
+ device_unregister(&mvnet_dev.dev);
+ idr_destroy(&mvnet_dev.vd_idr);
+ class_destroy(mvnet_dev.vd_class);
+ mvnet_dev.vd_class = NULL;
+ pr_info("mvnet_dev: Unloaded!\n");
+}
+
+module_init(mvnet_dev_init)
+module_exit(mvnet_dev_exit)
+
+MODULE_LICENSE("GPL v2");
+MODULE_INFO(supported, "Simulate loopback ethernet dev...
2019 Sep 10
0
[RFC PATCH 4/4] docs: Sample driver to demonstrate how to implement virtio-mdev framework
...ed3:
+
+ device_unregister(&mvnet_dev.dev);
+failed2:
+ class_destroy(mvnet_dev.vd_class);
+
+failed1:
+all_done:
+ return ret;
+}
+
+static void __exit mvnet_dev_exit(void)
+{
+ mvnet_dev.dev.bus = NULL;
+ mdev_unregister_device(&mvnet_dev.dev);
+
+ device_unregister(&mvnet_dev.dev);
+ idr_destroy(&mvnet_dev.vd_idr);
+ class_destroy(mvnet_dev.vd_class);
+ mvnet_dev.vd_class = NULL;
+ pr_info("mvnet_dev: Unloaded!\n");
+}
+
+module_init(mvnet_dev_init)
+module_exit(mvnet_dev_exit)
+
+MODULE_LICENSE("GPL v2");
+MODULE_INFO(supported, "Test driver that simulate seri...
2019 Oct 30
0
[PATCH V6 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework
...ed3:
+
+ device_unregister(&mvnet_dev.dev);
+failed2:
+ class_destroy(mvnet_dev.vd_class);
+
+failed1:
+all_done:
+ return ret;
+}
+
+static void __exit mvnet_dev_exit(void)
+{
+ mvnet_dev.dev.bus = NULL;
+ mdev_unregister_device(&mvnet_dev.dev);
+
+ device_unregister(&mvnet_dev.dev);
+ idr_destroy(&mvnet_dev.vd_idr);
+ class_destroy(mvnet_dev.vd_class);
+ mvnet_dev.vd_class = NULL;
+ pr_info("mvnet_dev: Unloaded!\n");
+}
+
+module_init(mvnet_dev_init)
+module_exit(mvnet_dev_exit)
+
+MODULE_LICENSE("GPL v2");
+MODULE_INFO(supported, "Simulate loopback ethernet dev...
2019 Nov 07
0
[PATCH V11 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework
...ed3:
+
+ device_unregister(&mvnet_dev.dev);
+failed2:
+ class_destroy(mvnet_dev.vd_class);
+
+failed1:
+all_done:
+ return ret;
+}
+
+static void __exit mvnet_dev_exit(void)
+{
+ mvnet_dev.dev.bus = NULL;
+ mdev_unregister_device(&mvnet_dev.dev);
+
+ device_unregister(&mvnet_dev.dev);
+ idr_destroy(&mvnet_dev.vd_idr);
+ class_destroy(mvnet_dev.vd_class);
+ mvnet_dev.vd_class = NULL;
+ pr_info("mvnet_dev: Unloaded!\n");
+}
+
+module_init(mvnet_dev_init)
+module_exit(mvnet_dev_exit)
+
+MODULE_LICENSE("GPL v2");
+MODULE_INFO(supported, "Simulate loopback ethernet dev...
2019 Nov 06
0
[PATCH V9 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework
...ed3:
+
+ device_unregister(&mvnet_dev.dev);
+failed2:
+ class_destroy(mvnet_dev.vd_class);
+
+failed1:
+all_done:
+ return ret;
+}
+
+static void __exit mvnet_dev_exit(void)
+{
+ mvnet_dev.dev.bus = NULL;
+ mdev_unregister_device(&mvnet_dev.dev);
+
+ device_unregister(&mvnet_dev.dev);
+ idr_destroy(&mvnet_dev.vd_idr);
+ class_destroy(mvnet_dev.vd_class);
+ mvnet_dev.vd_class = NULL;
+ pr_info("mvnet_dev: Unloaded!\n");
+}
+
+module_init(mvnet_dev_init)
+module_exit(mvnet_dev_exit)
+
+MODULE_LICENSE("GPL v2");
+MODULE_INFO(supported, "Simulate loopback ethernet dev...
2019 Nov 06
0
[PATCH V10 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework
...ed3:
+
+ device_unregister(&mvnet_dev.dev);
+failed2:
+ class_destroy(mvnet_dev.vd_class);
+
+failed1:
+all_done:
+ return ret;
+}
+
+static void __exit mvnet_dev_exit(void)
+{
+ mvnet_dev.dev.bus = NULL;
+ mdev_unregister_device(&mvnet_dev.dev);
+
+ device_unregister(&mvnet_dev.dev);
+ idr_destroy(&mvnet_dev.vd_idr);
+ class_destroy(mvnet_dev.vd_class);
+ mvnet_dev.vd_class = NULL;
+ pr_info("mvnet_dev: Unloaded!\n");
+}
+
+module_init(mvnet_dev_init)
+module_exit(mvnet_dev_exit)
+
+MODULE_LICENSE("GPL v2");
+MODULE_INFO(supported, "Simulate loopback ethernet dev...
2018 May 16
2
[RFC v4 3/5] virtio_ring: add packed ring support
...> } else {
> vq->vring = vring.vring_split;
> vq->avail_flags_shadow = 0;
> @@ -1384,6 +1853,8 @@ void vring_del_virtqueue(struct virtqueue *_vq)
> (void *)vq->vring.desc,
> vq->queue_dma_addr);
> }
> + if (vq->packed)
> + idr_destroy(&vq->buffer_id);
> list_del(&_vq->list);
> kfree(vq);
> }
2018 May 16
2
[RFC v4 3/5] virtio_ring: add packed ring support
...> } else {
> vq->vring = vring.vring_split;
> vq->avail_flags_shadow = 0;
> @@ -1384,6 +1853,8 @@ void vring_del_virtqueue(struct virtqueue *_vq)
> (void *)vq->vring.desc,
> vq->queue_dma_addr);
> }
> + if (vq->packed)
> + idr_destroy(&vq->buffer_id);
> list_del(&_vq->list);
> kfree(vq);
> }
2019 Nov 07
2
[PATCH V10 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework
..._destroy(mvnet_dev.vd_class);
> +
> +failed1:
> +all_done:
> + return ret;
> +}
> +
> +static void __exit mvnet_dev_exit(void)
> +{
> + mvnet_dev.dev.bus = NULL;
> + mdev_unregister_device(&mvnet_dev.dev);
> +
> + device_unregister(&mvnet_dev.dev);
> + idr_destroy(&mvnet_dev.vd_idr);
> + class_destroy(mvnet_dev.vd_class);
> + mvnet_dev.vd_class = NULL;
> + pr_info("mvnet_dev: Unloaded!\n");
> +}
> +
> +module_init(mvnet_dev_init)
> +module_exit(mvnet_dev_exit)
> +
> +MODULE_LICENSE("GPL v2");
> +MODULE_IN...
2019 Nov 07
2
[PATCH V10 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework
..._destroy(mvnet_dev.vd_class);
> +
> +failed1:
> +all_done:
> + return ret;
> +}
> +
> +static void __exit mvnet_dev_exit(void)
> +{
> + mvnet_dev.dev.bus = NULL;
> + mdev_unregister_device(&mvnet_dev.dev);
> +
> + device_unregister(&mvnet_dev.dev);
> + idr_destroy(&mvnet_dev.vd_idr);
> + class_destroy(mvnet_dev.vd_class);
> + mvnet_dev.vd_class = NULL;
> + pr_info("mvnet_dev: Unloaded!\n");
> +}
> +
> +module_init(mvnet_dev_init)
> +module_exit(mvnet_dev_exit)
> +
> +MODULE_LICENSE("GPL v2");
> +MODULE_IN...
2020 Feb 04
10
[PATCH] vhost: introduce vDPA based backend
...rr_register_vdpa_driver;
> +
> + return 0;
> +
> +err_register_vdpa_driver:
> + cdev_del(&vhost_vdpa.cdev);
> +err_cdev_add:
> + unregister_chrdev_region(vhost_vdpa.devt, MINORMASK + 1);
> +err_alloc_chrdev:
> + class_destroy(vhost_vdpa.class);
> +err_class:
> + idr_destroy(&vhost_vdpa.idr);
> + return r;
> +}
> +module_init(vhost_vdpa_init);
> +
> +static void __exit vhost_vdpa_exit(void)
> +{
> + unregister_vdpa_driver(&vhost_vdpa_driver);
> + cdev_del(&vhost_vdpa.cdev);
> + unregister_chrdev_region(vhost_vdpa.devt, MINORMASK +...
2020 Feb 04
10
[PATCH] vhost: introduce vDPA based backend
...rr_register_vdpa_driver;
> +
> + return 0;
> +
> +err_register_vdpa_driver:
> + cdev_del(&vhost_vdpa.cdev);
> +err_cdev_add:
> + unregister_chrdev_region(vhost_vdpa.devt, MINORMASK + 1);
> +err_alloc_chrdev:
> + class_destroy(vhost_vdpa.class);
> +err_class:
> + idr_destroy(&vhost_vdpa.idr);
> + return r;
> +}
> +module_init(vhost_vdpa_init);
> +
> +static void __exit vhost_vdpa_exit(void)
> +{
> + unregister_vdpa_driver(&vhost_vdpa_driver);
> + cdev_del(&vhost_vdpa.cdev);
> + unregister_chrdev_region(vhost_vdpa.devt, MINORMASK +...
2018 May 16
8
[RFC v4 0/5] virtio: support packed ring
Hello everyone,
This RFC implements packed ring support in virtio driver.
Some simple functional tests have been done with Jason's
packed ring implementation in vhost:
https://lkml.org/lkml/2018/4/23/12
Both of ping and netperf worked as expected (with EVENT_IDX
disabled).
TODO:
- Refinements (for code and commit log);
- More tests;
- Bug fixes;
RFC v3 -> RFC v4:
- Make ID allocation
2019 Sep 10
8
[RFC PATCH 0/4] mdev based hardware virtio offloading support
Hi all:
There are hardware that can do virtio datapath offloading while having
its own control path. This path tries to implement a mdev based
unified API to support using kernel virtio driver to drive those
devices. This is done by introducing a new mdev transport for virtio
(virtio_mdev) and register itself as a new kind of mdev driver. Then
it provides a unified way for kernel virtio driver to
2019 Nov 06
9
[PATCH V10 0/6] mdev based hardware virtio offloading support
Hi all:
There are hardwares that can do virtio datapath offloading while
having its own control path. This path tries to implement a mdev based
unified API to support using kernel virtio driver to drive those
devices. This is done by introducing a new mdev transport for virtio
(virtio_mdev) and register itself as a new kind of mdev driver. Then
it provides a unified way for kernel virtio driver