DPDK usage discussions
 help / color / mirror / Atom feed
* Adding a new core to a DPDK application that is already running
@ 2024-10-29 17:11 Antonio Di Bacco
  2024-10-29 17:28 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Antonio Di Bacco @ 2024-10-29 17:11 UTC (permalink / raw)
  To: users

I have a DPDK application that starts with a set of predefined cores.

Now, at runtime, I want to assign a new core to the application
without restarting it, then the application is notified to spawn a
thread on it.
Is this possible ?


Regards,
Anna.

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

* Re: Adding a new core to a DPDK application that is already running
  2024-10-29 17:11 Adding a new core to a DPDK application that is already running Antonio Di Bacco
@ 2024-10-29 17:28 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2024-10-29 17:28 UTC (permalink / raw)
  To: Antonio Di Bacco; +Cc: users

On Tue, 29 Oct 2024 18:11:13 +0100
Antonio Di Bacco <a.dibacco.ks@gmail.com> wrote:

> I have a DPDK application that starts with a set of predefined cores.
> 
> Now, at runtime, I want to assign a new core to the application
> without restarting it, then the application is notified to spawn a
> thread on it.
> Is this possible ?
> 
> 
> Regards,
> Anna.

Yes and no.
Yes you could create a thread and affinity it to an lcore; but you would
have to do that manually (there is not exposed API). And you would have
to register that lcore.

But, it is not tested. The application would probably have to change,
and you then have to design some mechanism to do mutual exclusion
during the change in lcores. Putting lock in hot path will kill
performance.

Also, some drivers may not expect number of lcores to change.

Short answer: not a good idea.

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

end of thread, other threads:[~2024-10-29 17:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-29 17:11 Adding a new core to a DPDK application that is already running Antonio Di Bacco
2024-10-29 17:28 ` Stephen Hemminger

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