1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-06 04:00:26 +02:00
Commit graph

338 commits

Author SHA1 Message Date
Andy Wingo
274cf43864 Add new old-gen predicate method: check a range of addresses 2025-01-06 16:59:54 +01:00
Andy Wingo
d96b53facd Missing inline decl: gc_old_generation_check_alloc_table_bit_pattern 2025-01-06 16:59:54 +01:00
Andy Wingo
b33efb2759 Copy space can reserve some blocks for field-logging bits
Useful for an oldgen
2025-01-06 16:59:54 +01:00
Andy Wingo
a74a2c129c Copy space has flags, can indicate that space is aligned
This will be useful for copy-space nurseries.
2025-01-06 16:59:54 +01:00
Andy Wingo
d2e745ac23 Rework large object space
Store allocations in a splay tree so that we can efficiently map from an
edge originating in the lospace to its object.  Defer returning memory
to the OS to a periodic background thread, using a similar strategy as
for nofl and copy-space pages.  Use a size-segregated freelist instead
of requiring a full best-fit search for those pages that haven't yet
been returned to the OS.
2025-01-06 16:59:54 +01:00
Andy Wingo
8e631ca3f3 Remove embedder requirement for per-object remset bits
Since we now have a field-logging write barrier, we don't need
per-object log bits.
2025-01-06 16:59:54 +01:00
Andy Wingo
4be3e69ac1 Add asserts to address map / address set 2025-01-06 16:59:54 +01:00
Andy Wingo
95868c70a2 Add splay tree 2025-01-06 16:59:54 +01:00
Andy Wingo
2dcdfc24bc Field set: per-edge clear callback is optional 2025-01-06 16:59:54 +01:00
Andy Wingo
6a6f5b09e3 Use PROT_NONE to reserve memory, then remap within that memory
Should play better with the kernel's overcommit heuristics.
2025-01-06 16:59:54 +01:00
Andy Wingo
922c13a183 Move mmap / munmap / madvise to gc-platform 2025-01-06 16:59:54 +01:00
Andy Wingo
ac016d5f83 nofl: Fix hole count / size computation for promoted blocks 2024-10-07 15:00:45 +02:00
Andy Wingo
cff99c75a8 Fix bug clearing field set 2024-10-04 14:00:47 +02:00
Andy Wingo
da4f1ec806 Fix bug in which head byte's logged bits were not cleared 2024-10-04 13:51:49 +02:00
Andy Wingo
b4ea55b9c4 Don't clear log bits when marking
This happens in a post-pass.
2024-10-04 13:51:27 +02:00
Andy Wingo
6d48e12f78 Add assertions when forgetting nofl edges 2024-10-04 13:51:17 +02:00
Andy Wingo
745a5ab558 Don't clear remembered set in non-generational mode 2024-10-04 13:50:57 +02:00
Andy Wingo
478b9de798 Add assertions when pushing edge buffers 2024-10-04 13:50:35 +02:00
Andy Wingo
15a51c8a85 Fix embarrassing bugs in write buffer fast path
Check edge address, not object address, and reverse the sense of the
check!
2024-10-04 13:50:01 +02:00
Andy Wingo
e1ae9819cf gc_object_is_old_generation uses relaxed atomics 2024-10-04 13:49:45 +02:00
Andy Wingo
3c8c956f4c Add gc_edge_address 2024-10-04 13:49:27 +02:00
Andy Wingo
1a79c3a451 mmc: only serialize root-tracing if there are pinned roots 2024-10-04 11:41:08 +02:00
Andy Wingo
b5c36b9fd8 Explicitly support immediate values
Because we have to deref edges ourselves, as part of generational
marking, we need to ignore edges that don't point to heap objects.
2024-10-04 11:40:09 +02:00
Andy Wingo
10017daa0c Inline set_field in mt-gcbench 2024-10-03 10:05:07 +02:00
Andy Wingo
095515eaed Rework write barrier fast/slow paths 2024-10-02 21:36:33 +02:00
Andy Wingo
1ecb45a437 Switch mmc to field-logging write barrier
Instead of the card table, use metadata bytes for field-logging.  More
precision should lead to less work during the pause.
2024-10-02 21:25:09 +02:00
Andy Wingo
1493bf6398 Add gc_object_is_old_generation
Will be useful for write barriers.
2024-10-01 15:48:55 +02:00
Andy Wingo
42bf36d7cc Add nursery for lospace 2024-10-01 14:38:08 +02:00
Andy Wingo
cc04761271 gc_object_set_remembered returns nonzero on success 2024-10-01 14:36:55 +02:00
Andy Wingo
4aa5d04f08 Fix sense of "large_object_space_is_copied".
* src/large-object-space.h (large_object_space_is_copied): I don't
understand why or how it was like it was!
2024-10-01 13:18:15 +02:00
Andy Wingo
8e1574491a Fix ephemerons test for mmc
Change to avoid detecting OOM based on no allocation since last GC, if
the collection was explicitly triggered by the user.
2024-10-01 13:16:43 +02:00
Andy Wingo
1f4e3bdf37 Add field-logging write barrier (fast path only)
Add a new kind of write barrier, one which has a bit per field; the
mutator that sets the bit will need to add the field's location (the
edge) to a remembered set.  Here we just have the fast-path
implementation.
2024-10-01 10:34:27 +02:00
Andy Wingo
3955d2ad96 Factor out locking utils to separate header 2024-09-30 20:52:45 +02:00
Andy Wingo
691c777e7b Fix ABA problem in the copy space
Same concerns as the previous fix to the nofl space.
2024-09-30 12:29:35 +02:00
Andy Wingo
326e925f4c Fix an ABA problem in the nofl space
We use Treiber stacks to represent sets of blocks: blocks to sweep, full
blocks, and so on.  This is fine as long as we are only adding to or
only removing from those sets, but as soon as we have concurrent add and
remove, we need to avoid the ABA problem.

Concurrent add and remove occurs for partly-full blocks, which are both
acquired and released by mutators; empty blocks, which can be added to
by heap growth at the same time as the mutator acquires them; and the
paged-out queue, which is also concurrent with heap growth/shrinkage.
2024-09-30 10:59:47 +02:00
Andy Wingo
a411599d87 Update README.md 2024-09-18 11:56:54 +02:00
Andy Wingo
8fba0e5322 Implement cooperative safepoint API
Fixes https://github.com/wingo/whippet/issues/9.
2024-09-18 11:54:36 +02:00
Andy Wingo
9f26dbb1fc Implement per-object pinning API
Fixes https://github.com/wingo/whippet/issues/6.
2024-09-18 10:55:02 +02:00
Andy Wingo
a722b9c13f Force major GC before signalling OOM 2024-09-16 15:46:49 +02:00
Andy Wingo
2b59efd9fc Fix semi-space with fixed-sized heaps 2024-09-16 15:06:50 +02:00
Andy Wingo
506b4187fc Update manual 2024-09-16 14:33:30 +02:00
Andy Wingo
b7306950bc Implement adaptive heap sizing for semi 2024-09-16 14:19:54 +02:00
Andy Wingo
1bf250f62a Heap growth can compete with lospace for nofl blocks 2024-09-16 13:40:09 +02:00
Andy Wingo
317039d952 Relax assertion when expanding the heap
It could be that newly mapped blocks were already acquired by other threads.
2024-09-16 13:07:25 +02:00
Andy Wingo
dcfdc547f6 Whoops, fix refactor-induced locking problem 2024-09-16 11:45:01 +02:00
Andy Wingo
cf570d0206 Don't release shared worklist buffers when less than 256 kB
Fixes https://github.com/wingo/whippet/issues/8.
2024-09-16 10:51:07 +02:00
Andy Wingo
7984f60eae MMC and PCC defer actual page-out operations to background thread
Should avoid excessive VM traffic when allocating large objects, or when
the adaptive heap sizer is on and we see frequent expansions and
resizes.
2024-09-16 10:00:01 +02:00
Andy Wingo
d785f082b1 Factor out adapative heap sizer background thread to own file
This will let us piggy-back on the thread to asynchronously release
memory to the OS.
2024-09-16 10:00:01 +02:00
Andy Wingo
2818958c59 First version of adaptive heap sizing for pcc and mcc 2024-09-16 09:59:55 +02:00
Andy Wingo
d19366bea2 Remove mention of concurrent marking for mmc 2024-09-10 11:35:28 +02:00