From 1b273b618002d65159453fdfb9520a9476e4423a Mon Sep 17 00:00:00 2001
From: Rickard Green
Date: Mon, 16 Aug 2010 19:38:33 +0200
Subject: Make it possible to reread and update detected CPU information
Calling erlang:system_info/1 with the new argument 'update_cpu_info'
will make the runtime system reread and update the internally stored
CPU information. For more information see the documentation of
erlang:system_info(update_cpu_info).
---
erts/doc/src/erlang.xml | 55 +++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 49 insertions(+), 6 deletions(-)
(limited to 'erts/doc')
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index 54a0a80536..cb3112acfe 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -5533,7 +5533,7 @@ true
CpuTopology type to change.
- {cpu_topology, defined}
+ {cpu_topology, defined}
-
Returns the user defined CpuTopology. For more
information see the documentation of
@@ -5543,7 +5543,7 @@ true
argument.
- {cpu_topology, detected}
+ {cpu_topology, detected}
-
Returns the automatically detected CpuTopology. The
emulator currently only detects the CPU topology on some newer
@@ -5727,11 +5727,34 @@ true
information see the "How to interpret the Erlang crash dumps" chapter
in the ERTS User's Guide.
- logical_processors
+ logical_processors
-
-
Returns the number of logical processors detected on the
- system as an integer or the atom unknown if the
- emulator wasn't able to detect any.
+
Returns the detected number of logical processors configured
+ on the system. The return value is either an integer, or
+ the atom unknown if the emulator wasn't able to
+ detect logical processors configured.
+
+
+ logical_processors_available
+ -
+
Returns the detected number of logical processors available to
+ the Erlang runtime system. The return value is either an
+ integer, or the atom unknown if the emulator wasn't
+ able to detect logical processors available. The number
+ of logical processors available is less than or equal to
+ the number of logical
+ processors online.
+
+
+ logical_processors_online
+ -
+
Returns the detected number of logical processors online on
+ the system. The return value is either an integer,
+ or the atom unknown if the emulator wasn't able to
+ detect logical processors online. The number of logical
+ processors online is less than or equal to the number of
+ logical processors
+ configured.
machine
@@ -5936,6 +5959,26 @@ true
get_tcw in "Match Specifications in Erlang",
ERTS User's Guide.
+ update_cpu_info
+ -
+
The runtime system rereads the CPU information available and
+ updates its internally stored information about the
+ detected CPU
+ topology and the amount of logical processors
+ configured,
+ online, and
+ available.
+ If the CPU information has changed since the last time it was read,
+ the atom changed is returned; otherwise, the atom
+ unchanged is returned. If the CPU information has changed
+ you probably want to
+ adjust the amount
+ of schedulers online. You typically want to have as
+ many schedulers online as
+ logical processors
+ available.
+
+
version
-
Returns a string containing the version number of the
--
cgit v1.2.3
From f45560001d8128193ed4933ab9dca1b105ae752a Mon Sep 17 00:00:00 2001
From: Rickard Green
Date: Tue, 17 Aug 2010 19:43:08 +0200
Subject: Implement automatic detection of CPU topology on Windows
The CPU topology is now automatically detected on Windows
systems with less than 33 logical processors. The runtime system
will now, also on Windows, by default bind schedulers to logical
processors using the 'default_bind' bind type if the amount of
schedulers is at least equal to the amount of logical processors
configured, binding of schedulers is supported, and a CPU topology
is available at startup.
---
erts/doc/src/erl.xml | 4 ++--
erts/doc/src/erlang.xml | 12 +++++++-----
2 files changed, 9 insertions(+), 7 deletions(-)
(limited to 'erts/doc')
diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml
index 0e26d62548..f477280a6f 100644
--- a/erts/doc/src/erl.xml
+++ b/erts/doc/src/erl.xml
@@ -685,8 +685,8 @@
erlang:system_flag(scheduler_bind_type, default_bind).
- Binding of schedulers are currently only supported on newer
- Linux and Solaris systems.
+ Binding of schedulers is currently only supported on newer
+ Linux, Solaris, and Windows systems.
If no CPU topology is available when the +sbt flag
is processed and BindType is any other type than
u, the runtime system will fail to start. CPU
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index cb3112acfe..a17a1d0ead 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -5175,9 +5175,9 @@ true
schedulers actually have bound as requested, call
erlang:system_info(scheduler_bindings).
- Schedulers can currently only be bound on newer Linux
- and Solaris systems, but more systems will be supported
- in the future.
+
Schedulers can currently only be bound on newer Linux,
+ Solaris, and Windows systems, but more systems will be
+ supported in the future.
In order for the runtime system to be able to bind schedulers,
the CPU topology needs to be known. If the runtime system fails
@@ -5547,8 +5547,10 @@ true
-
Returns the automatically detected CpuTopology. The
emulator currently only detects the CPU topology on some newer
- linux and solaris systems. For more information see the
- documentation of the
+ Linux, Solaris, and Windows systems. On Windows system with
+ more than 32 logical processors the CPU topology is not detected.
+
+ For more information see the documentation of the
cpu_topology
argument.
--
cgit v1.2.3