diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-04 16:47:17 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-04 16:47:17 +0000 |
commit | d1c2c408db0e03201c1645a4d699c9c5768cd8e9 (patch) | |
tree | 55e2c0e1ec0c6199db7f59a29b97d462f677b7cb /benchmark | |
parent | 829c42a201d28fa780570711a9c0c2aeab713499 (diff) | |
download | ruby-d1c2c408db0e03201c1645a4d699c9c5768cd8e9.tar.gz |
benchmark/bm_vm_thread_pass_flood.rb: add comment
I was about to write off this benchmark while working on GVL
improvements on multi-core systems.
However I noticed it exposes a weakness in my work-in-progress
code when I tested on an old single CPU system. Further testing
reveals setting CPU affinity ("schedtool -a 0x1" on Linux) on a
modern multi-core system is enough to reproduce the problem
exposed by this benchmark.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/bm_vm_thread_pass_flood.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/benchmark/bm_vm_thread_pass_flood.rb b/benchmark/bm_vm_thread_pass_flood.rb index 27157d1a6f..a660aafc18 100644 --- a/benchmark/bm_vm_thread_pass_flood.rb +++ b/benchmark/bm_vm_thread_pass_flood.rb @@ -1,3 +1,5 @@ +# n.b. this is a good test for GVL when pinned to a single CPU + 1000.times{ Thread.new{loop{Thread.pass}} } |