aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_init.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2010-11-02 11:52:22 +0100
committerRickard Green <[email protected]>2010-11-02 11:52:22 +0100
commit158ed71a5ddc5050809723a214a8d8c841022871 (patch)
tree13f2cfedca8745942abf0572dcbb9044e6ab3df1 /erts/emulator/beam/erl_init.c
parent96419fe8c795656c46ba50b1aac92c98acc73a0b (diff)
parent8faf1746ece60fc5fa634e5fd16e98df1ef7f3ba (diff)
downloadotp-158ed71a5ddc5050809723a214a8d8c841022871.tar.gz
otp-158ed71a5ddc5050809723a214a8d8c841022871.tar.bz2
otp-158ed71a5ddc5050809723a214a8d8c841022871.zip
Merge branch 'sf/erts_de_busy_limit' into dev
* sf/erts_de_busy_limit: Add flag-based setting for the distribution buffer busy limit
Diffstat (limited to 'erts/emulator/beam/erl_init.c')
-rw-r--r--erts/emulator/beam/erl_init.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_init.c b/erts/emulator/beam/erl_init.c
index 4ae656a3ad..36fefc5cba 100644
--- a/erts/emulator/beam/erl_init.c
+++ b/erts/emulator/beam/erl_init.c
@@ -535,7 +535,8 @@ void erts_usage(void)
erts_fprintf(stderr, "-W<i|w> set error logger warnings mapping,\n");
erts_fprintf(stderr, " see error_logger documentation for details\n");
-
+ erts_fprintf(stderr, "-zdbbl size set the distribution buffer busy limit in kilobytes\n");
+ erts_fprintf(stderr, " valid range is [1-%d]\n", INT_MAX/1024);
erts_fprintf(stderr, "\n");
erts_fprintf(stderr, "Note that if the emulator is started with erlexec (typically\n");
erts_fprintf(stderr, "from the erl script), these flags should be specified with +.\n");
@@ -818,7 +819,7 @@ early_init(int *argc, char **argv) /*
erl_sys_args(argc, argv);
erts_ets_realloc_always_moves = 0;
-
+ erts_dist_buf_busy_limit = ERTS_DE_BUSY_LIMIT;
}
#ifndef ERTS_SMP
@@ -1346,6 +1347,26 @@ erl_start(int argc, char **argv)
}
break;
+ case 'z': {
+ char *sub_param = argv[i]+2;
+ int new_limit;
+
+ if (has_prefix("dbbl", sub_param)) {
+ arg = get_arg(sub_param+4, argv[i+1], &i);
+ new_limit = atoi(arg);
+ if (new_limit < 1 || INT_MAX/1024 < new_limit) {
+ erts_fprintf(stderr, "Invalid dbbl limit: %d\n", new_limit);
+ erts_usage();
+ } else {
+ erts_dist_buf_busy_limit = new_limit*1024;
+ }
+ } else {
+ erts_fprintf(stderr, "bad -z option %s\n", argv[i]);
+ erts_usage();
+ }
+ break;
+ }
+
default:
erts_fprintf(stderr, "%s unknown flag %s\n", argv[0], argv[i]);
erts_usage();