aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2010-11-18 14:02:05 +0100
committerRickard Green <[email protected]>2010-11-18 14:02:05 +0100
commitc4b78dcacf24f871cbd2ecc6375c3af2c229d299 (patch)
tree5f026c1ec3dd6082c395ba7aa986be4fed89ba6f
parent17224a3d31d25ce6daa4de63b52b26bee9564bcd (diff)
downloadotp-c4b78dcacf24f871cbd2ecc6375c3af2c229d299.tar.gz
otp-c4b78dcacf24f871cbd2ecc6375c3af2c229d299.tar.bz2
otp-c4b78dcacf24f871cbd2ecc6375c3af2c229d299.zip
Do not use more reader groups for schedulers than schedulers
When the runtime system had fewer schedulers than logical processors, the system could get an unnecessarily large amount reader groups.
-rw-r--r--erts/emulator/beam/erl_init.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_init.c b/erts/emulator/beam/erl_init.c
index 4ae656a3ad..e2f2cccb7e 100644
--- a/erts/emulator/beam/erl_init.c
+++ b/erts/emulator/beam/erl_init.c
@@ -786,6 +786,8 @@ early_init(int *argc, char **argv) /*
elid.mem.ll.free = ethr_ll_free;
#ifdef ERTS_SMP
+ if (erts_max_main_threads > no_schedulers)
+ erts_max_main_threads = no_schedulers;
elid.main_threads = erts_max_main_threads;
#else
elid.main_threads = 1;