DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] crypto/virtio: alloc private data by NUMA affinity
@ 2019-09-04 13:21 Xiao Wang
  2019-10-04 12:00 ` Akhil Goyal
  2019-10-08  2:03 ` [dpdk-dev] " Zhoujian (jay)
  0 siblings, 2 replies; 5+ messages in thread
From: Xiao Wang @ 2019-09-04 13:21 UTC (permalink / raw)
  To: jianjay.zhou; +Cc: dev, Xiao Wang

It's better to allocate device private data on the same NUMA node with
device, rather than with the main thread. This helps avoid cross-NUMA
access for worker thread.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
---
 drivers/crypto/virtio/virtio_cryptodev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index f16bdfe57..4af479f54 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1441,7 +1441,7 @@ crypto_virtio_pci_probe(
 {
 	struct rte_cryptodev_pmd_init_params init_params = {
 		.name = "",
-		.socket_id = rte_socket_id(),
+		.socket_id = pci_dev->device.numa_node,
 		.private_data_size = sizeof(struct virtio_crypto_hw)
 	};
 	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
-- 
2.15.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] crypto/virtio: alloc private data by NUMA affinity
  2019-09-04 13:21 [dpdk-dev] [PATCH] crypto/virtio: alloc private data by NUMA affinity Xiao Wang
@ 2019-10-04 12:00 ` Akhil Goyal
  2019-10-08  2:06   ` [dpdk-dev] 答复: " Zhoujian (jay)
  2019-10-08  2:03 ` [dpdk-dev] " Zhoujian (jay)
  1 sibling, 1 reply; 5+ messages in thread
From: Akhil Goyal @ 2019-10-04 12:00 UTC (permalink / raw)
  To: jianjay.zhou; +Cc: dev, Xiao Wang

Hi Jay,

Could you please review this change.

Thanks,
Akhil

> 
> It's better to allocate device private data on the same NUMA node with
> device, rather than with the main thread. This helps avoid cross-NUMA
> access for worker thread.
> 
> Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
> ---
>  drivers/crypto/virtio/virtio_cryptodev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/crypto/virtio/virtio_cryptodev.c
> b/drivers/crypto/virtio/virtio_cryptodev.c
> index f16bdfe57..4af479f54 100644
> --- a/drivers/crypto/virtio/virtio_cryptodev.c
> +++ b/drivers/crypto/virtio/virtio_cryptodev.c
> @@ -1441,7 +1441,7 @@ crypto_virtio_pci_probe(
>  {
>  	struct rte_cryptodev_pmd_init_params init_params = {
>  		.name = "",
> -		.socket_id = rte_socket_id(),
> +		.socket_id = pci_dev->device.numa_node,
>  		.private_data_size = sizeof(struct virtio_crypto_hw)
>  	};
>  	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
> --
> 2.15.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] crypto/virtio: alloc private data by NUMA affinity
  2019-09-04 13:21 [dpdk-dev] [PATCH] crypto/virtio: alloc private data by NUMA affinity Xiao Wang
  2019-10-04 12:00 ` Akhil Goyal
@ 2019-10-08  2:03 ` Zhoujian (jay)
  2019-10-09  9:40   ` Akhil Goyal
  1 sibling, 1 reply; 5+ messages in thread
From: Zhoujian (jay) @ 2019-10-08  2:03 UTC (permalink / raw)
  To: Xiao Wang; +Cc: dev, Akhil Goyal, Huangweidong (C)



> -----Original Message-----
> From: Xiao Wang [mailto:xiao.w.wang@intel.com]
> Sent: Wednesday, September 4, 2019 9:22 PM
> To: Zhoujian (jay) <jianjay.zhou@huawei.com>
> Cc: dev@dpdk.org; Xiao Wang <xiao.w.wang@intel.com>
> Subject: [PATCH] crypto/virtio: alloc private data by NUMA affinity
> 
> It's better to allocate device private data on the same NUMA node with device,
> rather than with the main thread. This helps avoid cross-NUMA access for
> worker thread.
> 
> Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>

Reviewed-by: Jay Zhou <jianjay.zhou@huawei.com>

> ---
>  drivers/crypto/virtio/virtio_cryptodev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/crypto/virtio/virtio_cryptodev.c
> b/drivers/crypto/virtio/virtio_cryptodev.c
> index f16bdfe57..4af479f54 100644
> --- a/drivers/crypto/virtio/virtio_cryptodev.c
> +++ b/drivers/crypto/virtio/virtio_cryptodev.c
> @@ -1441,7 +1441,7 @@ crypto_virtio_pci_probe(  {
>  	struct rte_cryptodev_pmd_init_params init_params = {
>  		.name = "",
> -		.socket_id = rte_socket_id(),
> +		.socket_id = pci_dev->device.numa_node,
>  		.private_data_size = sizeof(struct virtio_crypto_hw)
>  	};
>  	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
> --
> 2.15.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] 答复:  [PATCH] crypto/virtio: alloc private data by NUMA affinity
  2019-10-04 12:00 ` Akhil Goyal
@ 2019-10-08  2:06   ` Zhoujian (jay)
  0 siblings, 0 replies; 5+ messages in thread
From: Zhoujian (jay) @ 2019-10-08  2:06 UTC (permalink / raw)
  To: Akhil Goyal; +Cc: dev, Xiao Wang, Huangweidong (C)



> -----Original Message-----
> From: Akhil Goyal [mailto:akhil.goyal@nxp.com]
> Sent: Friday, October 4, 2019 8:00 PM
> To: Zhoujian (jay) <jianjay.zhou@huawei.com>
> Cc: dev@dpdk.org; Xiao Wang <xiao.w.wang@intel.com>
> Subject: RE: [dpdk-dev] [PATCH] crypto/virtio: alloc private data by NUMA
> affinity
> 
> Hi Jay,
> 
> Could you please review this change.
> 
> Thanks,
> Akhil

Hi Akhil,

Sure, sorry for the late response.

Thanks,
Jay

> 
> >
> > It's better to allocate device private data on the same NUMA node with
> > device, rather than with the main thread. This helps avoid cross-NUMA
> > access for worker thread.
> >
> > Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
> > ---
> >  drivers/crypto/virtio/virtio_cryptodev.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/crypto/virtio/virtio_cryptodev.c
> > b/drivers/crypto/virtio/virtio_cryptodev.c
> > index f16bdfe57..4af479f54 100644
> > --- a/drivers/crypto/virtio/virtio_cryptodev.c
> > +++ b/drivers/crypto/virtio/virtio_cryptodev.c
> > @@ -1441,7 +1441,7 @@ crypto_virtio_pci_probe(  {
> >  	struct rte_cryptodev_pmd_init_params init_params = {
> >  		.name = "",
> > -		.socket_id = rte_socket_id(),
> > +		.socket_id = pci_dev->device.numa_node,
> >  		.private_data_size = sizeof(struct virtio_crypto_hw)
> >  	};
> >  	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
> > --
> > 2.15.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] crypto/virtio: alloc private data by NUMA affinity
  2019-10-08  2:03 ` [dpdk-dev] " Zhoujian (jay)
@ 2019-10-09  9:40   ` Akhil Goyal
  0 siblings, 0 replies; 5+ messages in thread
From: Akhil Goyal @ 2019-10-09  9:40 UTC (permalink / raw)
  To: Zhoujian (jay), Xiao Wang; +Cc: dev, Huangweidong (C)



> >
> > It's better to allocate device private data on the same NUMA node with device,
> > rather than with the main thread. This helps avoid cross-NUMA access for
> > worker thread.
> >
> > Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
> 
> Reviewed-by: Jay Zhou <jianjay.zhou@huawei.com>
> 
Applied to dpdk-next-crypto

Thanks.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-10-09  9:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04 13:21 [dpdk-dev] [PATCH] crypto/virtio: alloc private data by NUMA affinity Xiao Wang
2019-10-04 12:00 ` Akhil Goyal
2019-10-08  2:06   ` [dpdk-dev] 答复: " Zhoujian (jay)
2019-10-08  2:03 ` [dpdk-dev] " Zhoujian (jay)
2019-10-09  9:40   ` Akhil Goyal

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).