From 89ae66240cd34fb3c1364c7572d47369bccbd5b4 Mon Sep 17 00:00:00 2001 From: Brandt Bucher Date: Wed, 20 Nov 2024 12:52:45 -0800 Subject: [PATCH 1/3] Crank the warmup up to 256 --- Include/internal/pycore_backoff.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Include/internal/pycore_backoff.h b/Include/internal/pycore_backoff.h index 3e02728522828e..75c1e977a5e690 100644 --- a/Include/internal/pycore_backoff.h +++ b/Include/internal/pycore_backoff.h @@ -116,9 +116,9 @@ initial_jump_backoff_counter(void) * Must be larger than ADAPTIVE_COOLDOWN_VALUE, * otherwise when a side exit warms up we may construct * a new trace before the Tier 1 code has properly re-specialized. - * Backoff sequence 64, 128, 256, 512, 1024, 2048, 4096. */ -#define SIDE_EXIT_INITIAL_VALUE 63 -#define SIDE_EXIT_INITIAL_BACKOFF 6 + * Backoff sequence 256, 512, 1024, 2048, 4096. */ +#define SIDE_EXIT_INITIAL_VALUE 255 +#define SIDE_EXIT_INITIAL_BACKOFF 8 static inline _Py_BackoffCounter initial_temperature_backoff_counter(void) From 11add0fd309ef0f62f9c70f27342532e88bce18c Mon Sep 17 00:00:00 2001 From: Brandt Bucher Date: Wed, 20 Nov 2024 13:18:10 -0800 Subject: [PATCH 2/3] Crank the warmup up to 1024 --- Include/internal/pycore_backoff.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Include/internal/pycore_backoff.h b/Include/internal/pycore_backoff.h index 75c1e977a5e690..682e98f4995c2e 100644 --- a/Include/internal/pycore_backoff.h +++ b/Include/internal/pycore_backoff.h @@ -116,9 +116,9 @@ initial_jump_backoff_counter(void) * Must be larger than ADAPTIVE_COOLDOWN_VALUE, * otherwise when a side exit warms up we may construct * a new trace before the Tier 1 code has properly re-specialized. - * Backoff sequence 256, 512, 1024, 2048, 4096. */ -#define SIDE_EXIT_INITIAL_VALUE 255 -#define SIDE_EXIT_INITIAL_BACKOFF 8 + * Backoff sequence 1024, 2048, 4096. */ +#define SIDE_EXIT_INITIAL_VALUE 1023 +#define SIDE_EXIT_INITIAL_BACKOFF 10 static inline _Py_BackoffCounter initial_temperature_backoff_counter(void) From a8a4ed3d7cecf411a6ab44351a18d627544b7941 Mon Sep 17 00:00:00 2001 From: Brandt Bucher Date: Wed, 20 Nov 2024 13:43:53 -0800 Subject: [PATCH 3/3] Crank the warmup up to 4096 --- Include/internal/pycore_backoff.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Include/internal/pycore_backoff.h b/Include/internal/pycore_backoff.h index 682e98f4995c2e..b5e33fa8b7abc0 100644 --- a/Include/internal/pycore_backoff.h +++ b/Include/internal/pycore_backoff.h @@ -115,10 +115,9 @@ initial_jump_backoff_counter(void) /* Initial exit temperature. * Must be larger than ADAPTIVE_COOLDOWN_VALUE, * otherwise when a side exit warms up we may construct - * a new trace before the Tier 1 code has properly re-specialized. - * Backoff sequence 1024, 2048, 4096. */ -#define SIDE_EXIT_INITIAL_VALUE 1023 -#define SIDE_EXIT_INITIAL_BACKOFF 10 + * a new trace before the Tier 1 code has properly re-specialized. */ +#define SIDE_EXIT_INITIAL_VALUE 4095 +#define SIDE_EXIT_INITIAL_BACKOFF 12 static inline _Py_BackoffCounter initial_temperature_backoff_counter(void)