[#86787] [Ruby trunk Feature#14723] [WIP] sleepy GC — ko1@...

Issue #14723 has been updated by ko1 (Koichi Sasada).

13 messages 2018/05/01
[#86790] Re: [Ruby trunk Feature#14723] [WIP] sleepy GC — Eric Wong <normalperson@...> 2018/05/01

ko1@atdot.net wrote:

[#87095] [Ruby trunk Feature#14767] [PATCH] gc.c: use monotonic counters for objspace_malloc_increase — ko1@...

Issue #14767 has been updated by ko1 (Koichi Sasada).

9 messages 2018/05/17
[#87096] Re: [Ruby trunk Feature#14767] [PATCH] gc.c: use monotonic counters for objspace_malloc_increase — Eric Wong <normalperson@...> 2018/05/17

ko1@atdot.net wrote:

[ruby-core:86792] Re: [Ruby trunk Feature#14723] [WIP] sleepy GC

From: Eric Wong <normalperson@...>
Date: 2018-05-01 03:47:28 UTC
List: ruby-core #86792
Koichi Sasada <ko1@atdot.net> wrote:
> On 2018/05/01 12:18, Eric Wong wrote:
> >>`gc_rest()` do all of rest steps.  Is it intentional?
> >
> >I thought about that myself.  I haven't measured impact much and
> >decided to have less code.
> 
> On worst case, it takes few seconds. We have "incremental" mechanism so we
> should use same incremental technique here too.

Oh sorry, I realize I was using the wrong gc.c functions :x
Something like:
```
--- a/gc.c
+++ b/gc.c
@@ -6533,8 +6533,12 @@ int
 rb_gc_step(const rb_execution_context_t *ec)
 {
     rb_objspace_t *objspace = rb_ec_vm_ptr(ec)->objspace;
-
-    gc_rest(objspace);
+    if (is_lazy_sweeping(&objspace->eden_heap)) {
+	gc_sweep_step(objspace, &objspace->eden_heap);
+    }
+    else if (is_incremental_marking(objspace)) {
+        /* FIXME TODO */
+    }
 
     return rb_gc_inprogress(ec);
 }

```
I haven't looked at incremental mark, yet :x

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread