ruby-changes:46456
From: normal <ko1@a...>
Date: Fri, 5 May 2017 01:47:23 +0900 (JST)
Subject: [ruby-changes:46456] normal:r58571 (trunk): benchmark/bm_vm_thread_pass_flood.rb: add comment
normal 2017-05-05 01:47:17 +0900 (Fri, 05 May 2017) New Revision: 58571 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58571 Log: 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. Modified files: trunk/benchmark/bm_vm_thread_pass_flood.rb Index: benchmark/bm_vm_thread_pass_flood.rb =================================================================== --- benchmark/bm_vm_thread_pass_flood.rb (revision 58570) +++ benchmark/bm_vm_thread_pass_flood.rb (revision 58571) @@ -1,3 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_vm_thread_pass_flood.rb#L1 +# n.b. this is a good test for GVL when pinned to a single CPU + 1000.times{ Thread.new{loop{Thread.pass}} } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/