prevents thread from being pinned to core 8, to avoid L2 L1 overlap

This commit is contained in:
Reem Bahsoun
2024-06-10 14:31:35 +02:00
parent a5bf6c7812
commit 6cfb5b7ace
+4 -4
View File
@@ -57,10 +57,10 @@ void *aerial_vnf_nr_p7_thread_start(void *ptr)
int s;
cpu_set_t cpuset;
CPU_SET(8, &cpuset);
s = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
if (s != 0)
printf("failed to set afinity\n");
// CPU_SET(8, &cpuset);
// s = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
// if (s != 0)
// printf("failed to set afinity\n");
pthread_attr_t ptAttr;
if (pthread_attr_setschedpolicy(&ptAttr, SCHED_RR) != 0) {