File 6701-Remove-wrong-non_empty_runq-call.patch of Package erlang

From d638e5ce51b04e0c2cd6f67ec0282614e4b3220d Mon Sep 17 00:00:00 2001
From: Robin Morisset <rmorisset@meta.com>
Date: Mon, 14 Apr 2025 01:43:04 -0700
Subject: [PATCH 1/4] Remove (wrong) non_empty_runq call

If we steal exactly one task, then we directly execute it, and it never
ends up in our runqueue. So it is wrong to update the flag telling
everyone that we have work they can steal.
If we steal more than one task, then we will call erts_add_runq_len,
which will take care of calling erts_non_empty_runq for us.
---
 erts/emulator/beam/erl_process.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index ca8c7216e8..536750116d 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -9908,7 +9908,6 @@ Process *erts_schedule(ErtsSchedulerData *esdp, Process *p, int calls)
                     p = NULL;
                     if (try_steal_task(rq, &p)) {
                         if (p) {
-                            non_empty_runq(rq);
                             state = erts_atomic32_read_acqb(&p->state);
                             goto execute_process;
                         }
-- 
2.51.0

openSUSE Build Service is sponsored by