Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting affinity before creating threads #16

Open
mjaggi-cavium opened this issue May 14, 2018 · 1 comment
Open

Setting affinity before creating threads #16

mjaggi-cavium opened this issue May 14, 2018 · 1 comment

Comments

@mjaggi-cavium
Copy link

mjaggi-cavium commented May 14, 2018

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 pushed a commit to codeauroraforum/synchronization-benchmarks that referenced this issue May 14, 2018
Set thread affinity to a particular hardware thread prior to thread
creation.  This creates a potential disconnect between the start
order and the cpu on which the thread is running necessitating some
changes to the synchronized start code and the addition of a core
number thread argument in order to correctly index per-cpu variables
inside the locks algorithms.

Fixes ARM-software#16

Change-Id: Ia27d70e7d2875637a4ef1514e61636fc1b662698
@lucasclucasdo
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants