From 2f9a944bff2616dfc0559346351700f3730e32c7 Mon Sep 17 00:00:00 2001 From: sarathnandu Date: Wed, 24 Apr 2024 21:23:27 +0530 Subject: [PATCH] Increase yields multiplier on APPLE platforms (#1356) * Increase yields multiplier on APPLE platforms Signed-off-by: pavelkumbrasev Signed-off-by: sarathnandu Co-authored-by: pavelkumbrasev (cherry picked from commit 791701a8c650ede7a040caae08802355569c4341) --- src/tbb/scheduler_common.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/tbb/scheduler_common.h b/src/tbb/scheduler_common.h index ee13dbf981..a18fba4ce4 100644 --- a/src/tbb/scheduler_common.h +++ b/src/tbb/scheduler_common.h @@ -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. @@ -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{} {}