From: Eric Wong Date: 2018-05-01T03:47:28+00:00 Subject: [ruby-core:86792] Re: [Ruby trunk Feature#14723] [WIP] sleepy GC Koichi Sasada 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: