diff options
author | Rickard Green <[email protected]> | 2013-06-11 17:30:47 +0200 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2013-09-16 13:57:15 +0200 |
commit | 90351e1167a3bf21c2378306b68f560601e8415f (patch) | |
tree | 6824168cb5b70be26e3ebd929e679aa70cb3117c /erts/emulator/beam/erl_init.c | |
parent | c72b20183a780c7199d3959f09eb88c1a930a064 (diff) | |
download | otp-90351e1167a3bf21c2378306b68f560601e8415f.tar.gz otp-90351e1167a3bf21c2378306b68f560601e8415f.tar.bz2 otp-90351e1167a3bf21c2378306b68f560601e8415f.zip |
erts: Add the +sfwi system flag
+sfwi Interval
Set scheduler forced wakeup interval. All run queues will be scanned
each Interval milliseconds. While there are sleeping schedulers in
the system, one scheduler will be woken for each non-empty run queue
found. An Interval of zero disables this feature, which also is the
default.
This feature has been introduced as a temporary workaround for lengthy
executing native code, and native code that do not bump reductions
properly in OTP. When these bugs have be fixed the +sfwi flag will
be removed.
Conflicts:
erts/doc/src/erl.xml
erts/etc/common/erlexec.c
Diffstat (limited to 'erts/emulator/beam/erl_init.c')
-rw-r--r-- | erts/emulator/beam/erl_init.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_init.c b/erts/emulator/beam/erl_init.c index 1eb3dba240..7f52b111ac 100644 --- a/erts/emulator/beam/erl_init.c +++ b/erts/emulator/beam/erl_init.c @@ -1240,6 +1240,22 @@ erl_start(int argc, char **argv) ("suggested scheduler thread stack size %d kilo words\n", erts_sched_thread_suggested_stack_size)); } + else if (has_prefix("fwi", sub_param)) { + long val; + arg = get_arg(sub_param+3, argv[i+1], &i); + errno = 0; + val = strtol(arg, NULL, 10); + if (errno != 0 || val < 0) { + erts_fprintf(stderr, + "bad scheduler forced wakeup " + "interval %s\n", + arg); + erts_usage(); + } +#ifdef ERTS_SMP + erts_runq_supervision_interval = val; +#endif + } else { erts_fprintf(stderr, "bad scheduling option %s\n", argv[i]); erts_usage(); |