2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

dpif-netdev: Do not create handler threads.

Avoid unnecessary thread creation as no upcalls are generated,
resulting in idle threads waiting for process termination.

This optimization significantly reduces memory usage, cutting it
by half on a 128 CPU/thread system during testing, with the number
of threads reduced from 95 to 0.

Acked-by: Mike Pattrick <mkp@redhat.com>
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
This commit is contained in:
Eelco Chaudron
2024-02-20 10:31:34 +01:00
parent 166ee41d28
commit f0d1beca6c
2 changed files with 25 additions and 10 deletions

View File

@@ -5250,6 +5250,14 @@ dpif_netdev_set_config(struct dpif *dpif, const struct smap *other_config)
return 0;
}
static bool
dpif_netdev_number_handlers_required(struct dpif *dpif_ OVS_UNUSED,
uint32_t *n_handlers)
{
*n_handlers = 0;
return true;
}
/* Parses affinity list and returns result in 'core_ids'. */
static int
parse_affinity_list(const char *affinity_list, unsigned *core_ids, int n_rxq)
@@ -9989,7 +9997,7 @@ const struct dpif_class dpif_netdev_class = {
dpif_netdev_offload_stats_get,
NULL, /* recv_set */
NULL, /* handlers_set */
NULL, /* number_handlers_required */
dpif_netdev_number_handlers_required,
dpif_netdev_set_config,
dpif_netdev_queue_to_priority,
NULL, /* recv */