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

Use nanosleep on Linux in atomic_backoff when spinning for a long time. #106

Open
wants to merge 1 commit into
base: tbb_2019
Choose a base branch
from

Conversation

Lastique
Copy link
Contributor

@Lastique Lastique commented Dec 1, 2018

This allows to significantly reduce CPU system time while spinning, as
apparently nanosleep deschedules the thread for a longer time.

See #105. On the test presented there,
this patch offers to reduce CPU system time by 25-30%. On a real world
application that test is based on this patch offers ~10% improvement.

However, the change causes test_task_arena failures, as described in
#104.

This allows to significantly reduce CPU system time while spinning, as
apparently nanosleep deschedules the thread for a longer time.

See oneapi-src#105. On the test presented there,
this patch offers to reduce CPU system time by 25-30%. On a real world
application that test is based on this patch offers ~10% improvement.

However, the change causes test_task_arena failures, as described in
oneapi-src#104.
@Lastique
Copy link
Contributor Author

I've created an updated PR #327 that is rebased against oneTBB code base. I'm not closing this PR for reference and in case if anyone needs this functionality for older TBB releases. However, you can close it if you like.

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

Successfully merging this pull request may close these issues.

None yet

2 participants