aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_port_task.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-06-28 20:02:30 +0200
committerLukas Larsson <[email protected]>2017-10-02 10:34:27 +0200
commit5e1a70e5eb0bfc39add1acdb60d5c49021edebcd (patch)
treeecb11511d133253dc35299c4709e469cea360424 /erts/emulator/beam/erl_port_task.c
parentaf8380c319c01cfbf6262c3356462823b9e88c1c (diff)
downloadotp-5e1a70e5eb0bfc39add1acdb60d5c49021edebcd.tar.gz
otp-5e1a70e5eb0bfc39add1acdb60d5c49021edebcd.tar.bz2
otp-5e1a70e5eb0bfc39add1acdb60d5c49021edebcd.zip
erts: Optimize port_task quick allocator
for non scheduler threads by using ERTS_THR_PREF_QUICK_ALLOC_IMPL.
Diffstat (limited to 'erts/emulator/beam/erl_port_task.c')
-rw-r--r--erts/emulator/beam/erl_port_task.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/erts/emulator/beam/erl_port_task.c b/erts/emulator/beam/erl_port_task.c
index 141e815d1f..86df0f4cb8 100644
--- a/erts/emulator/beam/erl_port_task.c
+++ b/erts/emulator/beam/erl_port_task.c
@@ -147,10 +147,10 @@ static void begin_port_cleanup(Port *pp,
ErtsPortTask **execq,
int *processing_busy_q_p);
-ERTS_SCHED_PREF_QUICK_ALLOC_IMPL(port_task,
- ErtsPortTask,
- 1000,
- ERTS_ALC_T_PORT_TASK)
+ERTS_THR_PREF_QUICK_ALLOC_IMPL(port_task,
+ ErtsPortTask,
+ 1000,
+ ERTS_ALC_T_PORT_TASK)
ERTS_SCHED_PREF_QUICK_ALLOC_IMPL(busy_caller_table,
ErtsPortTaskBusyCallerTable,
@@ -2096,6 +2096,7 @@ erts_dequeue_port(ErtsRunQueue *rq)
void
erts_port_task_init(void)
{
- init_port_task_alloc();
+ init_port_task_alloc(erts_no_schedulers + erts_no_poll_threads
+ + 1); /* aux_thread */
init_busy_caller_table_alloc();
}