Re: [vpp-dev] fd to poll in VPP-API-CLIENT with no RX thread
Thank you Dave. Will import this patch and try. -- Thanks & Regards, Murthy -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#14597): https://lists.fd.io/g/vpp-dev/message/14597 Mute This Topic: https://lists.fd.io/mt/55586364/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] fd to poll in VPP-API-CLIENT with no RX thread
Please take a look at https://gerrit.fd.io/r/c/vpp/+/23427. From: vpp-dev@lists.fd.io On Behalf Of Satya Murthy Sent: Wednesday, November 13, 2019 8:24 PM To: vpp-dev@lists.fd.io Subject: Re: [vpp-dev] fd to poll in VPP-API-CLIENT with no RX thread Thanks a lot Dave for offering the help. The change would be of great help for us. Please let us know, once you have a patch, so that we can selectively take that patch and import. -- Thanks & Regards, Murthy -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#14594): https://lists.fd.io/g/vpp-dev/message/14594 Mute This Topic: https://lists.fd.io/mt/55586364/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] fd to poll in VPP-API-CLIENT with no RX thread
Thanks a lot Dave for offering the help. The change would be of great help for us. Please let us know, once you have a patch, so that we can selectively take that patch and import. -- Thanks & Regards, Murthy -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#14591): https://lists.fd.io/g/vpp-dev/message/14591 Mute This Topic: https://lists.fd.io/mt/55586364/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] fd to poll in VPP-API-CLIENT with no RX thread
If you use an rx pthread to tickle your main thread [via eventfd if you like] – and to do nothing else – I don’t see why you’d need to lock anything. We’d want to make a couple of very simple changes to .../src/vlibmemory/memory_client.c so folks can use any rx pthread function they like, instead of the default function. If you’re interested, I can make those changes. FWIW... Dave From: vpp-dev@lists.fd.io On Behalf Of Satya Murthy Sent: Wednesday, November 13, 2019 8:43 AM To: vpp-dev@lists.fd.io Subject: Re: [vpp-dev] fd to poll in VPP-API-CLIENT with no RX thread Thanks Dave for the quick reply. Main problem we are seeing with having RX thread is: 1) Our application sends VPP-API-request in main thread and stores the Request and context information in a list 2) If the response comes in the RX thread, we need to access the context information list in this thread which may force us to have locks across these data structures to clear contention between main and RX thread. We are worried abt performance degradation in control plane due to these locks when we have thousands of FIB entries ( in the order of 50K ). -- Thanks & Regards, Murthy -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#14588): https://lists.fd.io/g/vpp-dev/message/14588 Mute This Topic: https://lists.fd.io/mt/55586364/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] fd to poll in VPP-API-CLIENT with no RX thread
Thanks Ole for the response. We will weigh between performance of "unix domain sockets" vs "lock contention with rx thread" approached and go accordingly. -- Thanks & Regards, Murthy -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#14585): https://lists.fd.io/g/vpp-dev/message/14585 Mute This Topic: https://lists.fd.io/mt/55586364/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] fd to poll in VPP-API-CLIENT with no RX thread
Satya, > Main problem we are seeing with having RX thread is: > > 1) Our application sends VPP-API-request in main thread and stores the > Request and context information in a list > 2) If the response comes in the RX thread, we need to access the context > information list in this thread which may force us to have locks across these > data structures to clear contention between main and RX thread. > We are worried abt performance degradation in control plane due to these > locks when we have thousands of FIB entries ( in the order of 50K ). You could of course use the Unix domain socket instead of shared memory for API transport. The performace characteristics of that is of course different. Best regards, Ole-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#14582): https://lists.fd.io/g/vpp-dev/message/14582 Mute This Topic: https://lists.fd.io/mt/55586364/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] fd to poll in VPP-API-CLIENT with no RX thread
Thanks Dave for the quick reply. Main problem we are seeing with having RX thread is: 1) Our application sends VPP-API-request in main thread and stores the Request and context information in a list 2) If the response comes in the RX thread, we need to access the context information list in this thread which may force us to have locks across these data structures to clear contention between main and RX thread. We are worried abt performance degradation in control plane due to these locks when we have thousands of FIB entries ( in the order of 50K ). -- Thanks & Regards, Murthy -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#14581): https://lists.fd.io/g/vpp-dev/message/14581 Mute This Topic: https://lists.fd.io/mt/55586364/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] fd to poll in VPP-API-CLIENT with no RX thread
Wouldn’t be hard given that all of the relevant mechanisms are present in the underlying svm_queue code. The question becomes one of performance. Mutex/condvar signaling is lightweight, and the vpp graph dispatcher is perfectly set up to poll vpp’s main input queue. What’s the argument against creating an rx pthread in the usual way? You could, for example, use it to pop an eventfd local to your application... D. From: vpp-dev@lists.fd.io On Behalf Of Satya Murthy Sent: Wednesday, November 13, 2019 4:31 AM To: vpp-dev@lists.fd.io Subject: [vpp-dev] fd to poll in VPP-API-CLIENT with no RX thread Hi, We are trying to come up with VPP-API-CLIENT module that has no special RX thread. As we dont have no RX thread, we are planning to read messages from shared memory from our main dispatcher. To do this, we want to poll on an FD to check if any message arrived in the SHM queue. I was looking for some eventfd over this shared memory which indicates a message arrival. However, I dont see an eventfd getting flagged by VPP. This will make the client purely asynchronous without RX thread. I see some eventfd code in src/vnet/session/* code. But this does not seems to be used by general VPP API server code. Any inputs on how to achieve this pls ? -- Thanks & Regards, Murthy -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#14580): https://lists.fd.io/g/vpp-dev/message/14580 Mute This Topic: https://lists.fd.io/mt/55586364/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] fd to poll in VPP-API-CLIENT with no RX thread
Hi, We are trying to come up with VPP-API-CLIENT module that has no special RX thread. As we dont have no RX thread, we are planning to read messages from shared memory from our main dispatcher. To do this, we want to poll on an FD to check if any message arrived in the SHM queue. I was looking for some eventfd over this shared memory which indicates a message arrival. However, I dont see an eventfd getting flagged by VPP. This will make the client purely asynchronous without RX thread. I see some eventfd code in src/vnet/session/* code. But this does not seems to be used by general VPP API server code. Any inputs on how to achieve this pls ? -- Thanks & Regards, Murthy -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#14577): https://lists.fd.io/g/vpp-dev/message/14577 Mute This Topic: https://lists.fd.io/mt/55586364/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-