[#108771] [Ruby master Bug#18816] Ractor segfaulting MacOS 12.4 (aarch64 / M1 processor) — "brodock (Gabriel Mazetto)" <noreply@...>

Issue #18816 has been reported by brodock (Gabriel Mazetto).

8 messages 2022/06/05

[#108802] [Ruby master Feature#18821] Expose Pattern Matching interfaces in core classes — "baweaver (Brandon Weaver)" <noreply@...>

Issue #18821 has been reported by baweaver (Brandon Weaver).

9 messages 2022/06/08

[#108822] [Ruby master Feature#18822] Ruby lack a proper method to percent-encode strings for URIs (RFC 3986) — "byroot (Jean Boussier)" <noreply@...>

Issue #18822 has been reported by byroot (Jean Boussier).

18 messages 2022/06/09

[#108937] [Ruby master Bug#18832] Suspicious superclass mismatch — "fxn (Xavier Noria)" <noreply@...>

Issue #18832 has been reported by fxn (Xavier Noria).

16 messages 2022/06/15

[#108976] [Ruby master Misc#18836] DevMeeting-2022-07-21 — "mame (Yusuke Endoh)" <noreply@...>

Issue #18836 has been reported by mame (Yusuke Endoh).

12 messages 2022/06/17

[#109043] [Ruby master Bug#18876] OpenSSL is not available with `--with-openssl-dir` — "Gloomy_meng (Gloomy Meng)" <noreply@...>

Issue #18876 has been reported by Gloomy_meng (Gloomy Meng).

18 messages 2022/06/23

[#109052] [Ruby master Bug#18878] parse.y: Foo::Bar {} is inconsistently rejected — "qnighy (Masaki Hara)" <noreply@...>

Issue #18878 has been reported by qnighy (Masaki Hara).

9 messages 2022/06/26

[#109055] [Ruby master Bug#18881] IO#read_nonblock raises IOError when called following buffered character IO — "javanthropus (Jeremy Bopp)" <noreply@...>

Issue #18881 has been reported by javanthropus (Jeremy Bopp).

9 messages 2022/06/26

[#109063] [Ruby master Bug#18882] File.read cuts off a text file with special characters when reading it on MS Windows — magynhard <noreply@...>

Issue #18882 has been reported by magynhard (Matth辰us Johannes Beyrle).

15 messages 2022/06/27

[#109081] [Ruby master Feature#18885] Long lived fork advisory API (potential Copy on Write optimizations) — "byroot (Jean Boussier)" <noreply@...>

Issue #18885 has been reported by byroot (Jean Boussier).

23 messages 2022/06/28

[#109083] [Ruby master Bug#18886] Struct aref and aset don't trigger any tracepoints. — "ioquatix (Samuel Williams)" <noreply@...>

Issue #18886 has been reported by ioquatix (Samuel Williams).

8 messages 2022/06/29

[#109095] [Ruby master Misc#18888] Migrate ruby-lang.org mail services to Google Domains and Google Workspace — "shugo (Shugo Maeda)" <noreply@...>

Issue #18888 has been reported by shugo (Shugo Maeda).

16 messages 2022/06/30

[ruby-core:108925] [Ruby master Misc#18830] Remove MJIT worker thread

From: "k0kubun (Takashi Kokubun)" <noreply@...>
Date: 2022-06-15 07:53:58 UTC
List: ruby-core #108925
Issue #18830 has been reported by k0kubun (Takashi Kokubun).

----------------------------------------
Misc #18830: Remove MJIT worker thread
https://bugs.ruby-lang.org/issues/18830

* Author: k0kubun (Takashi Kokubun)
* Status: Open
* Priority: Normal
----------------------------------------
## Proposal

* Remove MJIT worker thread
  * Compiling ISeq to C should synchronously happen in Ruby threads
  * Unix platforms asynchronously wait for a C compiler process to finish using SIGCHLD, and MSWIN synchronously waits for a C compiler process to finish.

Note: The architecture is similar to what we did for the timer thread [Misc #14937]. Removing the MJIT worker thread using SIGCHLD is what @normalperson proposed before too.

## Motivation

* It's hard to maintain a JIT compiler if it can't touch Ruby VM. Many C functions in CRuby rely on the VM behind the scenes.
* It's hard to maintain a JIT compiler if it can't trigger GC. Not only you cannot use `xmalloc`, but also you have to fight race conditions with GC and SEGV caused by them.

## Assumptions

* The bottleneck of MJIT compilation is the time taken to wait for a C compiler process to finish. Thus compiling ISeq to C will not be a bottleneck. Potentially, this cost could be insignificant even if we rewrite the entire ISeq -> C compiler in Ruby.
* Nobody really uses MJIT on MSWIN. If the maintenance cost becomes too high because of the MSWIN-specific implementation introduced by this change, it's okay to just remove the support.

---

Patch: https://github.com/ruby/ruby/pull/6006

The motivation for this change is not about improving performance by itself, but this makes it slightly faster.

```
$ benchmark-driver benchmark.yml --rbenv 'before --mjit;after --mjit' -v --repeat-count=12 --output=all --alternate
before --mjit: ruby 3.2.0dev (2022-06-15T05:42:09Z master 46706e7808) +MJIT [x86_64-linux]
after --mjit: ruby 3.2.0dev (2022-06-15T07:21:31Z no-mjit-worker 90433da34d) +MJIT [x86_64-linux]
Calculating -------------------------------------
                                before --mjit          after --mjit
Optcarrot Lan_Master.nes    125.3789474179577     129.6361842567196 fps
                            125.7892049665125     130.1237905211524
                            126.3359252053467     131.3352551857975
                            127.2303480033240     131.5128102697965
                            127.2368143596796     131.9221842055012
                            127.3938219177180     131.9712318537562
                            127.8370994014408     132.0527716303878
                            127.9904178998168     132.4032777876095
                            128.0631040346902     132.4425814311906
                            128.3016029706804     132.5687514040249
                            128.8733290749460     132.7843477576762
                            129.5397101458566     133.4416009274654
```



-- 
https://bugs.ruby-lang.org/

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

In This Thread

Prev Next