Project

General

Profile

Actions

Feature #15085

closed

Decrease memory cache usage of MJIT

Added by wanabe (_ wanabe) over 6 years ago. Updated about 6 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:88887]

Description

MJIT makes ruby-methods faster by ordinary, but I have observed that some cases are exceptional.
I guess the one is caused by invokesuper instruction.
And I guess it is related to memory caching, especially iTLB.

Attached "export-big-func.patch" makes MJIT binary code for invokesuper smaller.
"super.rb" is a benchmark script with benchmark_driver.
"benchmark.log" is a result of super.rb.
"benchmark-with-perf.log" is another result with PERF_STAT environment variable.
The results are merely in my environment and depend to a large part on machine specs.

invokesuper can get faster with exported vm_search_super_method(), but I think it is not enough.
Because perf stat shows that there are still many iTLB-load-misses.
I believe MJIT can grow fast with good care for CPU memory cache, not only iTLB but also L1 / L2 and so on.


Files

export-big-func.patch (934 Bytes) export-big-func.patch wanabe (_ wanabe), 09/06/2018 10:57 PM
super.rb (897 Bytes) super.rb wanabe (_ wanabe), 09/06/2018 10:59 PM
benchmark.log (624 Bytes) benchmark.log wanabe (_ wanabe), 09/06/2018 11:03 PM
benchmark-with-perf.log (7.05 KB) benchmark-with-perf.log wanabe (_ wanabe), 09/06/2018 11:03 PM
export-vm_call_super_method.patch (2.66 KB) export-vm_call_super_method.patch wanabe (_ wanabe), 09/12/2018 11:45 PM
benchmark-with-perf-on-preview3.log (9.99 KB) benchmark-with-perf-on-preview3.log wanabe (_ wanabe), 11/09/2018 12:11 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0