aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2019-03-25 17:53:49 +0100
committerLukas Larsson <[email protected]>2019-03-25 17:53:49 +0100
commit922fd35583157596559227e0ec9e0163e8c3b9bc (patch)
treed2f28c1190d82f0efd43b8b10c5a00f07242a985
parent82a88748e5b83ba68a7cc5abc92321aea3ac2570 (diff)
downloadotp-922fd35583157596559227e0ec9e0163e8c3b9bc.tar.gz
otp-922fd35583157596559227e0ec9e0163e8c3b9bc.tar.bz2
otp-922fd35583157596559227e0ec9e0163e8c3b9bc.zip
erts: Yield when exiting/free process is suspended by de
-rw-r--r--erts/emulator/beam/erl_process.c2
-rw-r--r--erts/emulator/test/distribution_SUITE.erl16
2 files changed, 12 insertions, 6 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index 6a0c5bde58..9e662632b4 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -12894,8 +12894,8 @@ restart:
switch (result) {
case ERTS_DSIG_SEND_OK:
case ERTS_DSIG_SEND_TOO_LRG: /*SEND_SYSTEM_LIMIT*/
- case ERTS_DSIG_SEND_YIELD: /*SEND_YIELD_RETURN*/
break;
+ case ERTS_DSIG_SEND_YIELD: /*SEND_YIELD_RETURN*/
case ERTS_DSIG_SEND_CONTINUE: { /*SEND_YIELD_CONTINUE*/
goto yield;
}
diff --git a/erts/emulator/test/distribution_SUITE.erl b/erts/emulator/test/distribution_SUITE.erl
index 32d53ec7cd..449821e5ad 100644
--- a/erts/emulator/test/distribution_SUITE.erl
+++ b/erts/emulator/test/distribution_SUITE.erl
@@ -1422,7 +1422,7 @@ message_latency_large_exit(Nodename, ReasonFun) ->
FlushTrace = fun F() ->
receive
- {trace, Pid, _, _} = M ->
+ {trace, Pid, _, _} ->
F()
after 0 ->
ok
@@ -1456,8 +1456,14 @@ measure_latency_large_message(Nodename, DataFun) ->
Echo = spawn(N, fun F() -> receive {From, Msg} -> From ! Msg, F() end end),
- %% Test 32 MB and 320 MB and test the latency difference of sent messages
- Payloads = [{I, <<0:(I * 32 * 1024 * 1024 * 8)>>} || I <- [1,10]],
+ case erlang:system_info(build_type) of
+ debug ->
+ %% Test 3.2 MB and 32 MB and test the latency difference of sent messages
+ Payloads = [{I, <<0:(I * 32 * 1024 * 8)>>} || I <- [1,10]];
+ _ ->
+ %% Test 32 MB and 320 MB and test the latency difference of sent messages
+ Payloads = [{I, <<0:(I * 32 * 1024 * 1024 * 8)>>} || I <- [1,10]]
+ end,
IndexTimes = [{I, measure_latency(DataFun, Dropper, Echo, P)}
|| {I, P} <- Payloads],
@@ -1490,7 +1496,7 @@ measure_latency(DataFun, Dropper, Echo, Payload) ->
end) || _ <- lists:seq(1,2)],
[receive
- {monitor, _Sender, busy_dist_port, _Info} = M ->
+ {monitor, _Sender, busy_dist_port, _Info} ->
ok
end || _ <- lists:seq(1,10)],
@@ -1736,7 +1742,7 @@ bad_dist_fragments(Config) when is_list(Config) ->
start_monitor(Offender,P),
Exit2Victim = spawn(Victim, fun() -> receive ok -> ok end end),
- send_bad_fragments(Offender, Victim, P,{?DOP_PAYLOAD_EXIT2,P,ExitVictim},2,
+ send_bad_fragments(Offender, Victim, P,{?DOP_PAYLOAD_EXIT2,P,Exit2Victim},2,
[{hdr, 1, [132]}]),
start_monitor(Offender,P),