ARM-software / synchronization-benchmarks

Collection of synchronization micro-benchmarks and traces from infrastructure applications
Other
38 stars 36 forks source link

Setting affinity before creating threads #16

Open mjaggi-cavium opened 6 years ago

mjaggi-cavium commented 6 years ago

Should affinity of the thread be set before creating it ? I see that at some point one of the thread is not creating which makes thead0 wait indefinitely. This happens with high core count > 200

lucasclucasdo commented 6 years ago

The listed commit addresses this issue with what I think you are requesting. It seems to work fine on the systems to which I have access. Also, there is a new command-line option which should make the logical core number assignments behave in a more sensible order in case you're running on a 4 thread-per-core system (pass '-i 4' in this case). The threads still wait so delayed scheduling will still cause hangs; this feature is required to maximize the amount of time all requested cores are running simultaneously. Please test this out and let me know if it fixes your issue.