Displaying 20 results from an estimated 109 matches for "dev_to_nod".
Did you mean:
dev_to_node
2020 Jul 17
0
[PATCH] virtio_ring: use alloc_pages_node for NUMA-aware allocation
...ly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All error/warnings (new ones prefixed by >>):
drivers/virtio/virtio_ring.c: In function 'vring_alloc_queue':
>> drivers/virtio/virtio_ring.c:280:52: error: passing argument 1 of 'dev_to_node' from incompatible pointer type [-Werror=incompatible-pointer-types]
280 | struct page *page = alloc_pages_node(dev_to_node(&vdev->dev.parent),
| ^~~~~~~~~~~~~~~~~
|...
2020 Jun 25
5
[RFC 0/3] virtio: NUMA-aware memory allocation
These patches are not ready to be merged because I was unable to measure a
performance improvement. I'm publishing them so they are archived in case
someone picks up this work again in the future.
The goal of these patches is to allocate virtqueues and driver state from the
device's NUMA node for optimal memory access latency. Only guests with a vNUMA
topology and virtio devices spread
2020 Jun 25
5
[RFC 0/3] virtio: NUMA-aware memory allocation
These patches are not ready to be merged because I was unable to measure a
performance improvement. I'm publishing them so they are archived in case
someone picks up this work again in the future.
The goal of these patches is to allocate virtqueues and driver state from the
device's NUMA node for optimal memory access latency. Only guests with a vNUMA
topology and virtio devices spread
2017 Dec 12
1
[PATCHv2] virtio_mmio: fix devm cleanup
...gt;
> struct devres {
> struct devres_node node;
> /* -- 3 pointers */
> unsigned long long data[]; /* guarantee ull alignment */
> };
> 2) devm_kzalloc -> devm_kmalloc
>
> dr = alloc_dr(devm_kmalloc_release, size, gfp, dev_to_node(dev));
> "devm_kmalloc_release" is noop, do nothing.
Please note that the release function is there to perform cleanup prior
to the devm infrastructure releasing the memory.
The devm_kmalloc_release function is a no-op since nothing has to be
done prior to memory being freed, but th...
2017 Dec 12
1
[PATCHv2] virtio_mmio: fix devm cleanup
...gt;
> struct devres {
> struct devres_node node;
> /* -- 3 pointers */
> unsigned long long data[]; /* guarantee ull alignment */
> };
> 2) devm_kzalloc -> devm_kmalloc
>
> dr = alloc_dr(devm_kmalloc_release, size, gfp, dev_to_node(dev));
> "devm_kmalloc_release" is noop, do nothing.
Please note that the release function is there to perform cleanup prior
to the devm infrastructure releasing the memory.
The devm_kmalloc_release function is a no-op since nothing has to be
done prior to memory being freed, but th...
2020 Jul 17
0
[PATCH] virtio_ring: use alloc_pages_node for NUMA-aware allocation
...~~~~~~~~~~ ^
>> drivers/virtio/virtio_ring.c:280:52: error: incompatible pointer types passing 'struct device **' to parameter of type 'struct device *'; remove & [-Werror,-Wincompatible-pointer-types]
struct page *page = alloc_pages_node(dev_to_node(&vdev->dev.parent),
^~~~~~~~~~~~~~~~~
include/linux/device.h:668:46: note: passing argument to parameter 'dev' here
static inline int dev_to_node(struct device *dev)...
2019 May 14
2
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
...t;>> +};
>>> +
>>> +static int virtio_pmem_probe(struct virtio_device *vdev)
>>> +{
>>> + int err = 0;
>>> + struct resource res;
>>> + struct virtio_pmem *vpmem;
>>> + struct nd_region_desc ndr_desc = {};
>>> + int nid = dev_to_node(&vdev->dev);
>>> + struct nd_region *nd_region;
>>
>> Nit: use reverse Christmas tree layout :)
>
> Done.
>
>>
>>> +
>>> + if (!vdev->config->get) {
>>> + dev_err(&vdev->dev, "%s failure: config access disab...
2019 May 14
2
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
...t;>> +};
>>> +
>>> +static int virtio_pmem_probe(struct virtio_device *vdev)
>>> +{
>>> + int err = 0;
>>> + struct resource res;
>>> + struct virtio_pmem *vpmem;
>>> + struct nd_region_desc ndr_desc = {};
>>> + int nid = dev_to_node(&vdev->dev);
>>> + struct nd_region *nd_region;
>>
>> Nit: use reverse Christmas tree layout :)
>
> Done.
>
>>
>>> +
>>> + if (!vdev->config->get) {
>>> + dev_err(&vdev->dev, "%s failure: config access disab...
2019 Apr 10
3
[PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
..._list);
> +
> + return 0;
> +};
> +
> +static int virtio_pmem_probe(struct virtio_device *vdev)
> +{
> + int err = 0;
> + struct resource res;
> + struct virtio_pmem *vpmem;
> + struct nvdimm_bus *nvdimm_bus;
> + struct nd_region_desc ndr_desc = {};
> + int nid = dev_to_node(&vdev->dev);
> + struct nd_region *nd_region;
> +
> + if (!vdev->config->get) {
> + dev_err(&vdev->dev, "%s failure: config disabled\n",
Maybe s/config disabled/config access disabled/ ? That seems to be the
more common message.
> + __func__);
>...
2019 Apr 10
3
[PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
..._list);
> +
> + return 0;
> +};
> +
> +static int virtio_pmem_probe(struct virtio_device *vdev)
> +{
> + int err = 0;
> + struct resource res;
> + struct virtio_pmem *vpmem;
> + struct nvdimm_bus *nvdimm_bus;
> + struct nd_region_desc ndr_desc = {};
> + int nid = dev_to_node(&vdev->dev);
> + struct nd_region *nd_region;
> +
> + if (!vdev->config->get) {
> + dev_err(&vdev->dev, "%s failure: config disabled\n",
Maybe s/config disabled/config access disabled/ ? That seems to be the
more common message.
> + __func__);
>...
2014 Aug 20
1
[RFC PATCH 11/11] x86/MSI: Refactor x86 MSI code
...*msi, int nvec, int type)
> {
> struct msi_desc *msidesc;
> unsigned int irq;
> - int node, ret;
> + int ret;
>
> /* Multiple MSI vectors only supported with interrupt remapping */
> if (type == MSI_TYPE && nvec > 1)
> return 1;
>
> - node = dev_to_node(&dev->dev);
> -
> - list_for_each_entry(msidesc, &dev->msi_list, list) {
> - irq = irq_alloc_hwirq(node);
> + list_for_each_entry(msidesc, &msi->msi_list, list) {
> + irq = irq_alloc_hwirq(msi->node);
> if (!irq)
> return -ENOSPC;
>
> -...
2014 Aug 20
1
[RFC PATCH 11/11] x86/MSI: Refactor x86 MSI code
...*msi, int nvec, int type)
> {
> struct msi_desc *msidesc;
> unsigned int irq;
> - int node, ret;
> + int ret;
>
> /* Multiple MSI vectors only supported with interrupt remapping */
> if (type == MSI_TYPE && nvec > 1)
> return 1;
>
> - node = dev_to_node(&dev->dev);
> -
> - list_for_each_entry(msidesc, &dev->msi_list, list) {
> - irq = irq_alloc_hwirq(node);
> + list_for_each_entry(msidesc, &msi->msi_list, list) {
> + irq = irq_alloc_hwirq(msi->node);
> if (!irq)
> return -ENOSPC;
>
> -...
2016 Dec 01
0
[PATCH v5 1/1] crypto: add virtio-crypto driver
...ytes);
+ dst_nents = sg_nents(req->dst);
+
+ pr_debug("virtio_crypto: Number of sgs (src_nents: %d, dst_nents: %d)\n",
+ src_nents, dst_nents);
+
+ /* Why 3? outhdr + iv + inhdr */
+ sg_total = src_nents + dst_nents + 3;
+ sgs = kzalloc_node(sg_total * sizeof(*sgs), GFP_ATOMIC,
+ dev_to_node(&vcrypto->vdev->dev));
+ if (!sgs)
+ return -ENOMEM;
+
+ req_data = kzalloc_node(sizeof(*req_data), GFP_ATOMIC,
+ dev_to_node(&vcrypto->vdev->dev));
+ if (!req_data) {
+ kfree(sgs);
+ return -ENOMEM;
+ }
+
+ vc_req->req_data = req_data;
+ vc_req->type = VIRTIO_CRYPT...
2016 Dec 08
0
[PATCH v6 2/2] crypto: add virtio-crypto driver
...ytes);
+ dst_nents = sg_nents(req->dst);
+
+ pr_debug("virtio_crypto: Number of sgs (src_nents: %d, dst_nents: %d)\n",
+ src_nents, dst_nents);
+
+ /* Why 3? outhdr + iv + inhdr */
+ sg_total = src_nents + dst_nents + 3;
+ sgs = kzalloc_node(sg_total * sizeof(*sgs), GFP_ATOMIC,
+ dev_to_node(&vcrypto->vdev->dev));
+ if (!sgs)
+ return -ENOMEM;
+
+ req_data = kzalloc_node(sizeof(*req_data), GFP_ATOMIC,
+ dev_to_node(&vcrypto->vdev->dev));
+ if (!req_data) {
+ kfree(sgs);
+ return -ENOMEM;
+ }
+
+ vc_req->req_data = req_data;
+ vc_req->type = VIRTIO_CRYPT...
2016 Dec 14
0
[PATCH v7 1/1] crypto: add virtio-crypto driver
...ytes);
+ dst_nents = sg_nents(req->dst);
+
+ pr_debug("virtio_crypto: Number of sgs (src_nents: %d, dst_nents: %d)\n",
+ src_nents, dst_nents);
+
+ /* Why 3? outhdr + iv + inhdr */
+ sg_total = src_nents + dst_nents + 3;
+ sgs = kzalloc_node(sg_total * sizeof(*sgs), GFP_ATOMIC,
+ dev_to_node(&vcrypto->vdev->dev));
+ if (!sgs)
+ return -ENOMEM;
+
+ req_data = kzalloc_node(sizeof(*req_data), GFP_ATOMIC,
+ dev_to_node(&vcrypto->vdev->dev));
+ if (!req_data) {
+ kfree(sgs);
+ return -ENOMEM;
+ }
+
+ vc_req->req_data = req_data;
+ vc_req->type = VIRTIO_CRYPT...
2016 Dec 15
0
[PATCH v8 1/1] crypto: add virtio-crypto driver
...ytes);
+ dst_nents = sg_nents(req->dst);
+
+ pr_debug("virtio_crypto: Number of sgs (src_nents: %d, dst_nents: %d)\n",
+ src_nents, dst_nents);
+
+ /* Why 3? outhdr + iv + inhdr */
+ sg_total = src_nents + dst_nents + 3;
+ sgs = kzalloc_node(sg_total * sizeof(*sgs), GFP_ATOMIC,
+ dev_to_node(&vcrypto->vdev->dev));
+ if (!sgs)
+ return -ENOMEM;
+
+ req_data = kzalloc_node(sizeof(*req_data), GFP_ATOMIC,
+ dev_to_node(&vcrypto->vdev->dev));
+ if (!req_data) {
+ kfree(sgs);
+ return -ENOMEM;
+ }
+
+ vc_req->req_data = req_data;
+ vc_req->type = VIRTIO_CRYPT...
2016 Dec 08
4
[PATCH v6 0/2] virtio-crypto: add Linux driver
v6:
- add patch 1/2 to make sparc architecture happy. [Sam]
- close created sessions previousely when rekeying.
- convert the priority of virtio crypto algs from 4001 to 501
which is enough.
v5:
- add comments for algs_lock and table_lock. [Stefan]
- use kzfree instead of kfree for key material security. [Stefan]
- drop unnecessary spin_lock for struct virtio_crypto_ablkcipher_ctx.
-
2016 Dec 08
4
[PATCH v6 0/2] virtio-crypto: add Linux driver
v6:
- add patch 1/2 to make sparc architecture happy. [Sam]
- close created sessions previousely when rekeying.
- convert the priority of virtio crypto algs from 4001 to 501
which is enough.
v5:
- add comments for algs_lock and table_lock. [Stefan]
- use kzfree instead of kfree for key material security. [Stefan]
- drop unnecessary spin_lock for struct virtio_crypto_ablkcipher_ctx.
-
2016 Dec 06
2
[PATCH v5 1/1] crypto: add virtio-crypto driver
...gt; +
> + pr_debug("virtio_crypto: Number of sgs (src_nents: %d,
> dst_nents: %d)\n",
> + src_nents, dst_nents);
> +
> + /* Why 3? outhdr + iv + inhdr */
> + sg_total = src_nents + dst_nents + 3;
> + sgs = kzalloc_node(sg_total * sizeof(*sgs), GFP_ATOMIC,
> + dev_to_node(&vcrypto->vdev->dev));
> + if (!sgs)
> + return -ENOMEM;
> +
> + req_data = kzalloc_node(sizeof(*req_data), GFP_ATOMIC,
> + dev_to_node(&vcrypto->vdev->dev));
> + if (!req_data) {
> + kfree(sgs);
> + return -ENOMEM;
> + }
> +
> + vc_req-&g...
2016 Dec 06
2
[PATCH v5 1/1] crypto: add virtio-crypto driver
...gt; +
> + pr_debug("virtio_crypto: Number of sgs (src_nents: %d,
> dst_nents: %d)\n",
> + src_nents, dst_nents);
> +
> + /* Why 3? outhdr + iv + inhdr */
> + sg_total = src_nents + dst_nents + 3;
> + sgs = kzalloc_node(sg_total * sizeof(*sgs), GFP_ATOMIC,
> + dev_to_node(&vcrypto->vdev->dev));
> + if (!sgs)
> + return -ENOMEM;
> +
> + req_data = kzalloc_node(sizeof(*req_data), GFP_ATOMIC,
> + dev_to_node(&vcrypto->vdev->dev));
> + if (!req_data) {
> + kfree(sgs);
> + return -ENOMEM;
> + }
> +
> + vc_req-&g...