Skip to content
Snippets Groups Projects
Commit 7d9c1744 authored by Marek Vavruša's avatar Marek Vavruša
Browse files

udp: set thread affinity 1:1 to cpus

parent f352493d
No related branches found
No related tags found
No related merge requests found
......@@ -489,10 +489,8 @@ int udp_master(dthread_t *thread)
{
unsigned cpu = dt_online_cpus();
if (cpu > 1) {
unsigned cpu_mask[2];
cpu_mask[0] = dt_get_id(thread) % cpu;
cpu_mask[1] = (cpu_mask[0] + 2) % cpu;
dt_setaffinity(thread, cpu_mask, 2);
unsigned cpu_mask = (dt_get_id(thread) % cpu);
dt_setaffinity(thread, &cpu_mask, 1);
}
/* Drop all capabilities on all workers. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment