Re: [PATCH] cyclictest: Delay setting of main_affinity_mask after creating threads.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 6/15/22 16:19, Sebastian Andrzej Siewior wrote:
On 2022-06-15 14:24:31 [+0200], Pierre Gondois wrote:
Hello Sebastian,
Hi Pierre,

Since starting the threads represents some work that can disturb
the threads, shouldn't the main thread be migrated to the
'mainaffinity' mask early as it is right now ?

I doubt this such a huge impact given that once the threads are created,
they do rt_numa_set_numa_run_on_node() and pthread_setaffinity_np()
among other things.

I think it would be better to:
1. Save the initial mask of the main thread somewhere
2. Set the affinity of the main thread
3. Use the initial mask when setting the affinity of the threads

If this is *that* important I would lean towards always doing the
globalt_barr so all threads start once everything is set up. If I
remember correctly, the first few cycles are not counted and just fill
the cache.

Ok yes, I didn't see the globalt_barr barrier. FWIW I tested
the patch and it works well.


Regards,
Pierre

Sebastian



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux