diff options
author | Rickard Green <[email protected]> | 2010-11-02 11:52:22 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2010-11-02 11:52:22 +0100 |
commit | 158ed71a5ddc5050809723a214a8d8c841022871 (patch) | |
tree | 13f2cfedca8745942abf0572dcbb9044e6ab3df1 /erts/emulator/beam/dist.c | |
parent | 96419fe8c795656c46ba50b1aac92c98acc73a0b (diff) | |
parent | 8faf1746ece60fc5fa634e5fd16e98df1ef7f3ba (diff) | |
download | otp-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/dist.c')
-rw-r--r-- | erts/emulator/beam/dist.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c index 16b6aeac3f..4497e17d79 100644 --- a/erts/emulator/beam/dist.c +++ b/erts/emulator/beam/dist.c @@ -97,6 +97,8 @@ dist_msg_dbg(ErtsDistExternal *edep, char *what, byte *buf, int sz) #define PASS_THROUGH 'p' /* This code should go */ int erts_is_alive; /* System must be blocked on change */ +int erts_dist_buf_busy_limit; + /* distribution trap functions */ Export* dsend2_trap = NULL; @@ -1453,8 +1455,6 @@ int erts_net_message(Port *prt, return -1; } -#define ERTS_DE_BUSY_LIMIT (128*1024) - static int dsig_send(ErtsDSigData *dsdp, Eterm ctl, Eterm msg, int force_busy) { @@ -1540,7 +1540,7 @@ dsig_send(ErtsDSigData *dsdp, Eterm ctl, Eterm msg, int force_busy) ErtsProcList *plp = NULL; erts_smp_spin_lock(&dep->qlock); dep->qsize += size_obuf(obuf); - if (dep->qsize >= ERTS_DE_BUSY_LIMIT) + if (dep->qsize >= erts_dist_buf_busy_limit) dep->qflgs |= ERTS_DE_QFLG_BUSY; if (!force_busy && (dep->qflgs & ERTS_DE_QFLG_BUSY)) { erts_smp_spin_unlock(&dep->qlock); @@ -1911,7 +1911,7 @@ erts_dist_command(Port *prt, int reds_limit) ASSERT(dep->qsize >= obufsize); dep->qsize -= obufsize; obufsize = 0; - if (de_busy && !prt_busy && dep->qsize < ERTS_DE_BUSY_LIMIT) { + if (de_busy && !prt_busy && dep->qsize < erts_dist_buf_busy_limit) { ErtsProcList *suspendees; int resumed; suspendees = get_suspended_on_de(dep, ERTS_DE_QFLG_BUSY); |