[#39954] Fwd: [ruby-cvs:33451] Ruby:r26235 (trunk): * trace.h: new file. wraps tracing mechanisms. — SASADA Koichi <ko1@...>

 ささだです.

16 messages 2010/01/04
[#39957] Re: Fwd: [ruby-cvs:33451] Ruby:r26235 (trunk): * trace.h: new file. wraps tracing mechanisms. — Yugui <yugui@...> 2010/01/04

2010/1/4 SASADA Koichi <ko1@atdot.net>:

[#39959] Re: Fwd: [ruby-cvs:33451] Ruby:r26235 (trunk): * trace.h: new file. wraps tracing mechanisms. — SASADA Koichi <ko1@...> 2010/01/04

 ささだです.

[#39975] [Feature #2571] 文字列のハミング距離 — Kenta Murata <redmine@...>

Feature #2571: 文字列のハミング距離

14 messages 2010/01/07

[#39978] "require 'logge'" fails on ruby 1.8.7 from http://github.com/shyouhei/ruby — MOROHASHI Kyosuke <moronatural@...>

諸橋です。

7 messages 2010/01/07

[#40004] [Bug:trunk] require_relative depends on current directory — Yusuke ENDOH <mame@...>

遠藤です。

13 messages 2010/01/09

[#40074] [Bug #2603] NetBSD 5.0以降でpthreadの処理に由来する不具合 — Takahiro Kambe <redmine@...>

Bug #2603: NetBSD 5.0以降でpthreadの処理に由来する不具合

29 messages 2010/01/14
[#40086] Re: [Bug #2603] NetBSD 5.0以降でpthreadの処理に由来する不具合 — f-miura@... (MIURA, Fumiaki) 2010/01/14

NTTレゾナントの三浦です。不完全なpatchを書いてすみません。

[#40088] Re: [Bug #2603] NetBSD 5.0以降でpthreadの処理に由来する不具合 — Takahiro Kambe <taca@...> 2010/01/14

こんばんは。

[#40091] Re: [Bug #2603] NetBSD 5.0以降でpthreadの処理に由来する不具合 — KOSAKI Motohiro <kosaki.motohiro@...> 2010/01/15

kosakiです

[#40092] Re: [Bug #2603] NetBSD 5.0以降でpthreadの処理に由来する不具合 — Takahiro Kambe <taca@...> 2010/01/15

こんにちは。

[#40077] [Bug #2604] test_dsa_sign_verify() in test/openssl/test_ec.rb failes — Takahiro Kambe <redmine@...>

Bug #2604: test_dsa_sign_verify() in test/openssl/test_ec.rb failes

11 messages 2010/01/14

[#40153] [Bug:trunk] three bugs of Matrix::Scalar — Yusuke ENDOH <mame@...>

連投すみません。

19 messages 2010/01/25
[#40184] Re: [Bug:trunk] three bugs of Matrix::Scalar — keiju@... (石塚圭樹) 2010/01/27

けいじゅ@いしつかです.

[#40189] Re: [Bug:trunk] three bugs of Matrix::Scalar — Yusuke ENDOH <mame@...> 2010/01/27

遠藤です。

[#40191] Re: [Bug:trunk] three bugs of Matrix::Scalar — keiju@... (石塚圭樹) 2010/01/27

けいじゅ@いしつかです.

[#40224] Re: [Bug:trunk] three bugs of Matrix::Scalar — Yukihiro Matsumoto <matz@...> 2010/01/28

まつもと ゆきひろです

[#40162] [Bug #2658] rubyspec: Ruby character strings interpolates the return value of Object#inspect, without ivars, if Object#to_s does not return a String instance ERROR — Yusuke Endoh <redmine@...>

Bug #2658: rubyspec: Ruby character strings interpolates the return value of Object#inspect, without ivars, if Object#to_s does not return a String instance ERROR

8 messages 2010/01/26
[#40163] Re: [Bug #2658] rubyspec: Ruby character strings interpolates the return value of Object#inspect, without ivars, if Object#to_s does not return a String instance ERROR — Tanaka Akira <akr@...> 2010/01/26

2010年1月26日20:39 Yusuke Endoh <redmine@ruby-lang.org>:

[#40168] [Bug #2662] BigDecimal#ceil, etc. should not return Integer — Yusuke Endoh <redmine@...>

Bug #2662: BigDecimal#ceil, etc. should not return Integer

10 messages 2010/01/26

[#40200] [Feature #2673] the length for an enumerator generated by Array#permutation and Array#combination — Kenta Murata <redmine@...>

Feature #2673: the length for an enumerator generated by Array#permutation and Array#combination

14 messages 2010/01/28

[#40221] [Bug:trunk] rubyspec: SimpleDelegator when frozen creates a frozen clone ERROR — Yusuke ENDOH <mame@...>

まつもとさん、または lib/delegator.rb についてわかる誰か

13 messages 2010/01/28

[#40265] MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...>

手元の Ubuntu 9.10 の環境で Ruby 1.9.2 を make test-all すると

38 messages 2010/01/30
[#40326] Re: MonitorMixin::ConditionVariable#wait timeout — Shugo Maeda <shugo@...> 2010/02/05

前田です。

[#41155] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/05

前田さん、akr さん

[#41157] Re: MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...> 2010/05/05

2010年5月5日9:32 Yusuke ENDOH <mame@tsg.ne.jp>:

[#41158] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/05

遠藤です。

[#41159] Re: MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...> 2010/05/05

2010年5月5日11:46 Yusuke ENDOH <mame@tsg.ne.jp>:

[#41160] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/05

遠藤です。

[#41182] Re: MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...> 2010/05/06

2010年5月5日13:22 Yusuke ENDOH <mame@tsg.ne.jp>:

[#41183] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/06

遠藤です。

[#41186] Re: MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...> 2010/05/06

2010年5月6日19:58 Yusuke ENDOH <mame@tsg.ne.jp>:

[#41205] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/06

遠藤です。

[#41207] Re: MonitorMixin::ConditionVariable#wait timeout — KOSAKI Motohiro <kosaki.motohiro@...> 2010/05/06

2010年5月6日23:08 Yusuke ENDOH <mame@tsg.ne.jp>:

[#41208] Re: MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...> 2010/05/06

2010年5月6日23:15 KOSAKI Motohiro <kosaki.motohiro@gmail.com>:

[#41245] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/10

遠藤です。

[#41252] Re: MonitorMixin::ConditionVariable#wait timeout — KOSAKI Motohiro <kosaki.motohiro@...> 2010/05/10

kosakiです

[#41255] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/10

遠藤です。

[#41256] Re: MonitorMixin::ConditionVariable#wait timeout — Masaya TARUI <tarui@...> 2010/05/10

樽家です。

[#40269] [Feature #2695] Supported Platforms — Kazuhiro NISHIYAMA <redmine@...>

Feature #2695: Supported Platforms

17 messages 2010/01/31
[#40760] [Feature #2695] Supported Platforms — Yusuke Endoh <redmine@...> 2010/03/25

チケット #2695 が更新されました。 (by Yusuke Endoh)

[ruby-dev:40060] Re: Linuxで bm_vm3_thread_mutex.rb が刺さってしまい実行が完了しない

From: KOSAKI Motohiro <kosaki.motohiro@...>
Date: 2010-01-12 14:25:41 UTC
List: ruby-dev #40060
>> last_thread 0で10秒なところから、自分的にはデッドロックチェックありでも15秒以下に
>> したいなーとか思って悩んでいるのですが、まだ良い案がありません。
>
> もうちょっと自分で意図を補足しますと、Fedoraはext/opensslのコンパイル通らない問題で、実質trunkのサポートプラットフォームからすでに外れてしまっている状況なので、筋の良くないfixを急いで入れるよりも根本解決するべく、もっと分析を進めた方が前向きかなぁと
>

そろそろ苦情が来そうですが、もうちょっと分析したので記録のために書きます。
thread.cのmutexの実装をよくよく見るとGVLを離している期間があまりにも短すぎてmutex->lockを
導入してる意味がほとんどないように見えます。またいくつかの箇所でGVLとmutex->lockを同時につかんだり、
GVLを離した直後にmutex->lock or th->interrupted_lock
をつかんでいたりと、「逆に性能に悪影響があるのではないか?」と思える箇所があったので、添付ののパッチ(0001-Remove-mutex-lock-and-th-interrupt_lock)で実験してみました。

一言で言うと mutex->lock と th->interrupt_lock を廃止し、GVLを真のジャイアントロックにする。というパッチです。

bm_vm3_thread_mutex.rb に関しては10回の平均値が以下のような数値になっており、今までのどの測定よりもいい数値になっています。

1.340147932  seconds time elapsed   ( +-   1.406% )

また、他のベンチの数値も remove-mutex-lock.txt に5回平均の比較表を添付しましたが、ほぼ差がないようです。
そろそろささださんを召喚するべきかな?元々のmutex->lockの導入意図とか知りたいし。

ps ちょっと意図が理解できないsched_yield()がいくつかあるので、今後整理したいです。現状のLinuxのスケジューラだとsched_yield()はほぼNOPに近い動きをするので、意図通り動いていない可能性があります。

Attachments (2)

remove-mutex-lock.txt (2.56 KB, text/plain)
			ruby.trunk	remove-mutex-lock	ratio
app_answer      	0.182	0.178	97.80%
app_erb 		0.88	0.864	98.18%
app_factorial   	0.237	0.224	94.51%
app_fib 		2.285	2.286	100.04%
app_mandelbrot  	0.429	0.417	97.20%
app_pentomino   	39.182	39.285	100.26%
app_raise       	1.001	1.016	101.50%
app_strconcat   	0.781	0.824	105.51%
app_tak 		3.014	3.002	99.60%
app_tarai       	2.494	2.513	100.76%
app_uri 		1.776	1.834	103.27%
io_file_create  	0.5	0.506	101.20%
io_file_read    	0.703	0.644	91.61%
io_file_write   	0.186	0.196	105.38%
loop_for        	3.474	3.565	102.62%
loop_generator  	1.143	1.119	97.90%
loop_times      	3.032	3.052	100.66%
loop_whileloop  	2.945	2.935	99.66%
loop_whileloop2 	0.606	0.607	100.17%
so_ackermann    	2.591	2.6	100.35%
so_array        	3.273	3.228	98.63%
so_binary_trees 	1.042	1.06	101.73%
so_concatenate  	0.896	0.901	100.56%
so_count_words  	0.594	0.611	102.86%
so_exception    	2.155	2.143	99.44%
so_fannkuch     	34.714	35.066	101.01%
so_fasta        	4.809	4.77	99.19%
so_k_nucleotide 	3.34	3.408	102.04%
so_lists        	0.756	0.766	101.32%
so_mandelbrot   	12.373	12.443	100.57%
so_matrix       	0.849	0.835	98.35%
so_meteor_contest	9.742	9.5	97.52%
so_nbody        	8.784	9.084	103.42%
so_nested_loop  	3.214	3.16	98.32%
so_nsieve       	9.471	9.568	101.02%
so_nsieve_bits  	5.917	6.064	102.48%
so_object       	1.982	2.013	101.56%
so_partial_sums 	11.917	11.996	100.66%
so_pidigits     	1.908	1.713	89.78%
so_random       	0.814	0.8	98.28%
so_reverse_complement	3.633	3.597	99.01%
so_sieve        	0.259	0.256	98.84%
so_spectralnorm 	9.302	9.376	100.80%
vm1_block*      	5.164	5.178	100.27%
vm1_const*      	1.685	1.65	97.92%
vm1_ensure*     	0.76	0.724	95.26%
vm1_ivar*       	2.092	2.241	107.12%
vm1_ivar_set*   	2.219	2.38	107.26%
vm1_length*     	2.885	2.939	101.87%
vm1_neq*        	2.007	2.004	99.85%
vm1_not*        	1.376	1.319	95.86%
vm1_rescue*     	1.023	1.026	100.29%
vm1_simplereturn*     	3.685	3.668	99.54%
vm1_swap*       	1.095	1.088	99.36%
vm2_array*      	1.434	1.508	105.16%
vm2_case*       	0.536	0.505	94.22%
vm2_eval*       	28.479	29.251	102.71%
vm2_method*     	5.641	5.633	99.86%
vm2_mutex*      	2.686	2.366	88.09%
vm2_poly_method*      	7.082	7.135	100.75%
vm2_poly_method_ov*   	0.772	0.752	97.41%
vm2_proc*       	1.449	1.421	98.07%
vm2_regexp*     	3.008	2.875	95.58%
vm2_send*       	0.882	0.922	104.54%
vm2_super*      	1.368	1.376	100.58%
vm2_unif1*      	0.824	0.809	98.18%
vm2_zsuper*     	1.531	1.49	97.32%
vm3_gc  		2.085	2.096	100.53%
vm3_thread_create_join  3.943	3.859	97.87%

In This Thread

Prev Next