From: "ko1 (Koichi Sasada) via ruby-core" <ruby-core@ml.ruby-lang.org>
To: ruby-core@ml.ruby-lang.org
Cc: "ko1 (Koichi Sasada)" <noreply@ruby-lang.org>
Subject: [ruby-core:120132] [Ruby master Misc#16124] Let the transient heap belong to objspace
Date: Sun, 08 Dec 2024 06:55:33 +0000 (UTC) [thread overview]
Message-ID: <redmine.journal-110882.20241208065532.967@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-16124.20190824124153.967@ruby-lang.org>
Issue #16124 has been updated by ko1 (Koichi Sasada).
Status changed from Assigned to Rejected
transient heap was removed.
----------------------------------------
Misc #16124: Let the transient heap belong to objspace
https://bugs.ruby-lang.org/issues/16124#change-110882
* Author: methodmissing (Lourens Naudé)
* Status: Rejected
* Assignee: ko1 (Koichi Sasada)
----------------------------------------
As per comment from Nobu in https://github.com/ruby/ruby/pull/2303#issuecomment-523248875 , I took an initial stab @ a tighter integration between objspace and the transient heap in https://github.com/ruby/ruby/pull/2400
### Benefits
* Multi-VM (MVM) friendly - ( vm -> objspace -> theap )
* The 32MB (current size) arena lazy allocated on ruby init is now properly freed on shutdown as well
* It feels strange that the evacuation from the current global theap is to objspace, whereas the space evacuated from is a global arena.
### Not so great
* A fast reference to a global variable `global_transient_heap` becomes a function call to `rb_objspace_get_theap()` and related pointer chasing from vm -> objspace -> theap
* Some internal transient heap structs moved to the header file now leaks into all other reference sites where this source file (`transient_heap.c`) as previously just used for API
* I'm not sure exactly of the boundary Koichi had in mind for the GC compile module and how tightly it should (or shouldn't) be coupled to the transient heap. `struct rb_objspace*` declarations elsewhere for example reveals nothing about the structure members for example, whereas with this PR a lot of transient heap internals are exposed via the header file now
* Also possible to move `transient_heap.c` into `gc.c` - I feel theap is not an experimental feature anymore and has been stable for quite some time with plausible performance benefits. The downside of that is `gc.c` is quite dense already, but then all ruby heap management concerns belong to one compile unit.
In a similar vein the global method cache could perhaps belong to the VM instance as well, effectively better alignment with MVM and also easier to have a balanced VM setup and teardown sequence without anything left dangling on ruby shutdown.
Thoughts?
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
parent reply other threads:[~2024-12-08 6:55 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <redmine.issue-16124.20190824124153.967@ruby-lang.org>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.journal-110882.20241208065532.967@ruby-lang.org \
--to=ruby-core@ml.ruby-lang.org \
--cc=noreply@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).