[#80974] [Ruby trunk Feature#13517] [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit — ko1@...
Issue #13517 has been updated by ko1 (Koichi Sasada).
4 messages
2017/05/02
[#81024] Re: [Ruby trunk Feature#13517] [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit
— SASADA Koichi <ko1@...>
2017/05/07
sorry for late response.
[#80996] [Ruby trunk Feature#13544] Allow loading an ISeqs sequence directly from a C extension without requiring buffer is in an RVALUE — sam.saffron@...
Issue #13544 has been reported by sam.saffron (Sam Saffron).
3 messages
2017/05/04
[#81016] [Ruby trunk Bug#13526] Segmentation fault at 0x0055c2e58e8920 ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux] — s.wanabe@...
Issue #13526 has been updated by wanabe (_ wanabe).
3 messages
2017/05/07
[#81048] Re: [ruby-cvs:65788] normal:r58614 (trunk): rb_execution_context_t: move stack, stack_size and cfp from rb_thread_t — SASADA Koichi <ko1@...>
It causes compile error on raspi 3.
3 messages
2017/05/09
[#81201] Re: [ruby-cvs:65935] normal:r58761 (trunk): test/test_extilibs.rb: do not check the existence of fiddle — "U.NAKAMURA" <usa@...>
Hi, Eric
4 messages
2017/05/16
[#81202] Re: [ruby-cvs:65935] normal:r58761 (trunk): test/test_extilibs.rb: do not check the existence of fiddle
— Eric Wong <normalperson@...>
2017/05/16
"U.NAKAMURA" <usa@garbagecollect.jp> wrote:
[#81427] Fwd: [ruby-changes:46809] normal:r58924 (trunk): test for IO.copy_stream CPU usage (r58534) — SASADA Koichi <ko1@...>
Hi,
6 messages
2017/05/28
[#81428] Re: Fwd: [ruby-changes:46809] normal:r58924 (trunk): test for IO.copy_stream CPU usage (r58534)
— Eric Wong <normalperson@...>
2017/05/28
SASADA Koichi <ko1@atdot.net> wrote:
[ruby-core:81427] Fwd: [ruby-changes:46809] normal:r58924 (trunk): test for IO.copy_stream CPU usage (r58534)
From:
SASADA Koichi <ko1@...>
Date:
2017-05-28 01:22:38 UTC
List:
ruby-core #81427
Hi,
My CI reports many failures on this test_copy_stream_no_busy_wait.
http://ci.rvm.jp/
On Debian (I forget the version, but using Kernel 3.2.0-4-amd64):
http://ci.rvm.jp/results/trunk-test@sasada-8core (search "NG")
https://gist.github.com/anonymous/26dc659e34320b40d27591b4f91f51fe#file-brlog-trunk-test-20170528-100249-L655
On Ubuntu14:
http://ci.rvm.jp/results/trunk-test@frontier (search "NG")
https://gist.github.com/ko1/aa95d84417fa79284a0613c17729e4e7#file-brlog-trunk-test-20170528-041307-L647
On Ubuntu16:
http://ci.rvm.jp/results/trunk@P895
http://ci.rvm.jp/results/trunk-test@ruby-sky3
(search "NG")
https://gist.github.com/anonymous/316832cba0307d0344434f144a292e59#file-brlog-trunk-20170528-084148-L409
https://gist.github.com/anonymous/8da1d0b0a7b3de10b9b4fe6bd24658ea#file-brlog-trunk-20170528-023739-L397
https://gist.github.com/anonymous/6144a5e1a54ba317f47326dd465492df#file-brlog-trunk-20170527-235730-L373
On raspi:
http://ci.rvm.jp/results/trunk@pi2 (search "NG")
https://gist.github.com/anonymous/c089332f436bd0a0ecf8b4a0113e01ea#file-brlog-trunk-20170528-004604-L375
Is it intentional or not?
Thanks,
Koichi
-------- Forwarded Message --------
Subject: [ruby-changes:46809] normal:r58924 (trunk): test for
IO.copy_stream CPU usage (r58534)
Date: Sat, 27 May 2017 16:23:05 +0900 (JST)
From: normal <ko1@atdot.net>
Reply-To: ruby-changes@quickml.atdot.net
To: ruby-changes@quickml.atdot.net
normal 2017-05-27 16:23:02 +0900 (Sat, 27 May 2017)
New Revision: 58924
https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58924
Log:
test for IO.copy_stream CPU usage (r58534)
I'm likely to make similar mistakes in the future when working
on Fiber auto-scheduling. Start adding assertions for existing
code, first.
* test/ruby/test_io.rb (test_copy_stream_no_busy_wait): added
* test/lib/test/unit/assertions.rb (assert_cpu_usage_low): added
Modified files:
trunk/test/lib/test/unit/assertions.rb
trunk/test/ruby/test_io.rb
Index: test/lib/test/unit/assertions.rb
===================================================================
--- test/lib/test/unit/assertions.rb (revision 58923)
+++ test/lib/test/unit/assertions.rb (revision 58924)
@@ -715,6 +715,13 @@ eom
https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit/assertions.rb#L715
skip
end
+ def assert_cpu_usage_low(msg = nil, pct: 0.005)
+ require 'benchmark'
+ tms = Benchmark.measure(msg || '') { yield }
+ max = pct * tms.real
+ assert_operator tms.total, :<=, max, msg
+ end
+
def assert_is_minus_zero(f)
assert(1.0/f == -Float::INFINITY, "#{f} is not -0.0")
end
Index: test/ruby/test_io.rb
===================================================================
--- test/ruby/test_io.rb (revision 58923)
+++ test/ruby/test_io.rb (revision 58924)
@@ -532,6 +532,18 @@ class TestIO < Test::Unit::TestCase
https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L532
end
if have_nonblock?
+ def test_copy_stream_no_busy_wait
+ IO.pipe do |r,w|
+ r.nonblock = true
+ assert_cpu_usage_low('r58534 [ruby-core:80969] [Backport
#13533]') do
+ th = Thread.new { IO.copy_stream(r, IO::NULL) }
+ sleep 0.1
+ w.close
+ th.join
+ end
+ end
+ end
+
def test_copy_stream_pipe_nonblock
mkcdtmpdir {
with_read_pipe("abc") {|r1|
--
ML: ruby-changes@quickml.atdot.net
Info: http://www.atdot.net/~ko1/quickml/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>