aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_sched_spec_pre_alloc.h
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2012-07-19 22:54:09 +0200
committerRickard Green <[email protected]>2012-07-31 16:58:24 +0200
commit146d7cb4821a9c2c864b91c78de2e58f79918c63 (patch)
tree78aaea4270f35e078305102e6330b7d43353b187 /erts/emulator/beam/erl_sched_spec_pre_alloc.h
parent8457bb3aeb335733d22ab6d517fe173cd90b4f55 (diff)
downloadotp-146d7cb4821a9c2c864b91c78de2e58f79918c63.tar.gz
otp-146d7cb4821a9c2c864b91c78de2e58f79918c63.tar.bz2
otp-146d7cb4821a9c2c864b91c78de2e58f79918c63.zip
Improve the enqueue operation of delayed dealloc
The enqueue operation have been re-written to behave better during heavy contention by spreading writes over multiple locations. This enqueue operation also take advantage of the delayed aux work wake up functionality and can by this omit one memory barrier.
Diffstat (limited to 'erts/emulator/beam/erl_sched_spec_pre_alloc.h')
-rw-r--r--erts/emulator/beam/erl_sched_spec_pre_alloc.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_sched_spec_pre_alloc.h b/erts/emulator/beam/erl_sched_spec_pre_alloc.h
index d36066c399..bccb1aba7a 100644
--- a/erts/emulator/beam/erl_sched_spec_pre_alloc.h
+++ b/erts/emulator/beam/erl_sched_spec_pre_alloc.h
@@ -142,7 +142,8 @@ check_local_list(erts_sspa_chunk_header_t *chdr)
erts_sspa_data_t *erts_sspa_create(size_t blk_sz,
int pa_size);
void erts_sspa_remote_free(erts_sspa_chunk_header_t *chdr,
- erts_sspa_blk_t *blk);
+ erts_sspa_blk_t *blk,
+ int cinit);
erts_sspa_blk_t *erts_sspa_process_remote_frees(erts_sspa_chunk_header_t *chdr,
erts_sspa_blk_t *old_res);
@@ -216,7 +217,7 @@ erts_sspa_free(erts_sspa_data_t *data, int cix, char *cblk)
chdr = &chnk->aligned.header;
if (chnk_cix != cix) {
/* Remote chunk */
- erts_sspa_remote_free(chdr, blk);
+ erts_sspa_remote_free(chdr, blk, chnk_cix - cix);
}
else {
/* Local chunk */