Skip to content

Commit

Permalink
Increase yields multiplier on APPLE platforms (#1356)
Browse files Browse the repository at this point in the history
* Increase yields multiplier on APPLE platforms

Signed-off-by: pavelkumbrasev <[email protected]>
Signed-off-by: sarathnandu <[email protected]>
Co-authored-by: pavelkumbrasev <[email protected]>
(cherry picked from commit 791701a)
  • Loading branch information
sarathnandu committed May 8, 2024
1 parent c3aaf2c commit 2f9a944
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/tbb/scheduler_common.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
/*
<<<<<<< .mine
Copyright (c) 2005-2021 Intel Corporation
=======
Copyright (c) 2005-2024 Intel Corporation
>>>>>>> .theirs
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -245,12 +249,18 @@ class stealing_loop_backoff {
// no worse than 2x the optimal spin time. Or perhaps a time-slice quantum is the right amount.
stealing_loop_backoff(int num_workers)
: my_pause_threshold{ 2 * (num_workers + 1) }
<<<<<<< .mine
#if __APPLE__
// threshold value tuned separately for macOS due to high cost of sched_yield there
, my_yield_threshold{10}
#else
=======




>>>>>>> .theirs
, my_yield_threshold{100}
#endif
, my_pause_count{}
, my_yield_count{}
{}
Expand Down

0 comments on commit 2f9a944

Please sign in to comment.