Skip to content

Commit

Permalink
Update Tpause constant for better performance on high core count syst…
Browse files Browse the repository at this point in the history
…em. (#1149)

* Update Tpause constant for better performance on high core count system.

Signed-off-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>
  • Loading branch information
sarathnandu authored Jul 26, 2023
1 parent aff58fe commit 7c79c82
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tbb/scheduler_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,10 @@ inline void prolonged_pause() {
std::uint64_t time_stamp = machine_time_stamp();
// _tpause function directs the processor to enter an implementation-dependent optimized state
// until the Time Stamp Counter reaches or exceeds the value specified in second parameter.
// Constant "700" is ticks to wait for.
// Constant "1000" is ticks to wait for.
// TODO : Modify this parameter based on empirical study of benchmarks.
// First parameter 0 selects between a lower power (cleared) or faster wakeup (set) optimized state.
_tpause(0, time_stamp + 700);
_tpause(0, time_stamp + 1000);
}
else
#endif
Expand Down

0 comments on commit 7c79c82

Please sign in to comment.