File 0176-erts-Change-default-scheduler-busy-wait-time-to-very.patch of Package erlang

From 28c8b32f1e65b23882b5deb82cdc92e95c16c109 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?John=20H=C3=B6gberg?= <john@erlang.org>
Date: Thu, 3 Oct 2019 12:27:40 +0200
Subject: [PATCH 2/3] erts: Change default scheduler busy-wait time to
 very_short

---
 erts/doc/src/erl.xml             | 11 ++++++-----
 erts/emulator/beam/erl_process.c |  5 +----
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml
index 7e34e10a96..49d917fde8 100644
--- a/erts/doc/src/erl.xml
+++ b/erts/doc/src/erl.xml
@@ -1180,9 +1180,10 @@
           <tag><marker id="+sbwt"/>
             <c>+sbwt none|very_short|short|medium|long|very_long</c></tag>
           <item>
-            <p>Sets scheduler busy wait threshold. Defaults to <c>medium</c>.
-              The threshold determines how long schedulers are to busy
-              wait when running out of work before going to sleep.</p>
+            <p>Sets scheduler busy wait threshold. Defaults to
+              <c>very_short</c>. The threshold determines how long schedulers
+              are to busy wait when running out of work before going to
+              sleep.</p>
             <note>
               <p>This flag can be removed or changed at any time
                 without prior notice.</p>
@@ -1192,7 +1193,7 @@
             <c>+sbwtdcpu none|very_short|short|medium|long|very_long</c></tag>
           <item>
             <p>As <seealso marker="#+sbwt"><c>+sbwt</c></seealso> but affects
-              dirty CPU schedulers. Defaults to <c>short</c>.</p>
+              dirty CPU schedulers. Defaults to <c>very_short</c>.</p>
             <note>
               <p>This flag can be removed or changed at any time
                 without prior notice.</p>
@@ -1202,7 +1203,7 @@
             <c>+sbwtdio none|very_short|short|medium|long|very_long</c></tag>
           <item>
             <p>As <seealso marker="#+sbwt"><c>+sbwt</c></seealso> but affects
-              dirty IO schedulers. Defaults to <c>short</c>.</p>
+              dirty IO schedulers. Defaults to <c>very_short</c>.</p>
             <note>
               <p>This flag can be removed or changed at any time
                 without prior notice.</p>
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index 73dc8aa040..34a5feace4 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -5609,11 +5609,8 @@ erts_early_init_scheduling(int no_schedulers)
         erts_sched_set_wakeup_other_threshold(type, "medium");
         erts_sched_set_wakeup_other_type(type, "default");
 
-        erts_sched_set_busy_wait_threshold(type, "medium");
+        erts_sched_set_busy_wait_threshold(type, "very_short");
     }
-
-    erts_sched_set_busy_wait_threshold(ERTS_SCHED_DIRTY_CPU, "short");
-    erts_sched_set_busy_wait_threshold(ERTS_SCHED_DIRTY_IO, "short");
 }
 
 int
-- 
2.16.4

openSUSE Build Service is sponsored by