diff options
author | Lukas Larsson <[email protected]> | 2018-10-09 16:11:43 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2018-10-23 09:58:38 +0200 |
commit | 090f9543f66cc0c4ea4d1ca63902c300b103f271 (patch) | |
tree | 70aabba756f9b6550b52d523472079b12219e0d6 /erts/emulator/beam/erl_async.c | |
parent | d9682b02b81fa6e23e554b6e017650eb89ecebed (diff) | |
download | otp-090f9543f66cc0c4ea4d1ca63902c300b103f271.tar.gz otp-090f9543f66cc0c4ea4d1ca63902c300b103f271.tar.bz2 otp-090f9543f66cc0c4ea4d1ca63902c300b103f271.zip |
erts: Pass thread progress data where possible
The poll thread does a lot of waking up and then going
back to sleep. A large part of the waking up is managing
thread progress and a large part of that was using thread
specific data to get the thread progress data pointer.
With this refactor the tpd is passed to each of the functions
which greatly decreases the number of ethr_get_tsd calls
which in turn halves the CPU usage of the poller thread in
certain scenarios.
Diffstat (limited to 'erts/emulator/beam/erl_async.c')
-rw-r--r-- | erts/emulator/beam/erl_async.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_async.c b/erts/emulator/beam/erl_async.c index 605a2b3461..44655ad5df 100644 --- a/erts/emulator/beam/erl_async.c +++ b/erts/emulator/beam/erl_async.c @@ -336,7 +336,7 @@ static ERTS_INLINE ErtsAsync *async_get(ErtsThrQ_t *q, case ERTS_THR_Q_NEED_THR_PRGR: { ErtsThrPrgrVal prgr = erts_thr_q_need_thr_progress(q); - erts_thr_progress_wakeup(NULL, prgr); + erts_thr_progress_wakeup(erts_thr_prgr_data(NULL), prgr); /* * We do no dequeue finalizing in hope that a new async * job will arrive before we are woken due to thread |