Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
3161-erts-Remove-second-off-heap-iteration-afte...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 3161-erts-Remove-second-off-heap-iteration-after-GC.patch of Package erlang
From fed54408530b1acb01fcbe2435c84414a5586d39 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson <sverker@erlang.org> Date: Mon, 23 Aug 2021 20:51:21 +0200 Subject: [PATCH 1/4] erts: Remove second off-heap iteration after GC Instead reset PB_ACTIVE_WRITER flag during first off-heap iteration while looking for binary shrink candidates. --- erts/emulator/beam/erl_gc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c index d3d79959df..ec66d0c3bb 100644 --- a/erts/emulator/beam/erl_gc.c +++ b/erts/emulator/beam/erl_gc.c @@ -456,17 +456,19 @@ erts_gc_after_bif_call(Process* p, Eterm result, Eterm* regs, Uint arity) result, regs, arity); } -static ERTS_INLINE void reset_active_writer(Process *p) +static ERTS_INLINE void assert_no_active_writers(Process *p) { +#ifdef DEBUG struct erl_off_heap_header* ptr; ptr = MSO(p).first; while (ptr) { if (ptr->thing_word == HEADER_PROC_BIN) { ProcBin *pbp = (ProcBin*) ptr; - pbp->flags &= ~PB_ACTIVE_WRITER; + ERTS_ASSERT(!(pbp->flags & PB_ACTIVE_WRITER)); } ptr = ptr->next; } +#endif } #define ERTS_DELAY_GC_EXTRA_FREE 40 @@ -771,7 +773,7 @@ do_major_collection: ERTS_MSACC_SET_STATE_CACHED_X(ERTS_MSACC_STATE_GC); } - reset_active_writer(p); + assert_no_active_writers(p); /* * Finish. @@ -2816,6 +2818,7 @@ link_live_proc_bin(struct shrink_cand_data *shrink, if (pbp->flags & PB_ACTIVE_WRITER) { + pbp->flags &= ~PB_ACTIVE_WRITER; shrink->no_of_active++; } else { /* inactive */ -- 2.31.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor