about summary refs log tree commit homepage
DateCommit message (Collapse)
2016-12-16kgio 2.11.0 - reverting 2.10.0 breakage v2.11.0
Mainly this release reverts back to kgio 2.9.3 behavior by supporting "autopush" functionality in the C extension. Removing this feature in 2.10.0 was a monumental mistake(*) on my part which caused a performance regression for ONE known user of kgio on the deprecated (but supported) Rainbows! server. This release does not affect known users outside of Rainbows!, but we may have unknown users, too. The attempt at a pure Ruby version of autopush had flaws and regressions in real-world testing, so that was abandoned. So yeah, kgio will be supported indefinitely even in the face of internal changes to MRI, but I strongly discourage its use for new projects. Users who only support Ruby 2.3 (and later) are encouraged to use `exception: false` with all *_nonblock methods. 4 changes since 2.10.0: resurrect Kgio.autopush support in pure Ruby [REVERTED] reinstate the original (and dangerous) autopush in C TODO: update with Ruby 2.3 status test: increase test data sizes to fill socket buffers (*) - as was making this a separate project, at all
2016-12-16test: increase test data sizes to fill socket buffers
Some Debian build machines use insanely large socket buffers, so increase our test buffers to large values to force EAGAIN: https://bugs.debian.org/830353 In my experience, using setsockopt to clamp buffers to small sizes can lead to unpredictable stalls, too, so it might not be good to do in a test case, either.
2016-12-16TODO: update with Ruby 2.3 status
Since we're on the cusp of Ruby 2.4, I guess 2.3 features are stable.
2016-12-15reinstate the original (and dangerous) autopush in C
The regression for existing users was unnacceptable and completely poor judgement on my part. This change brings us back to potentially not-future-compatible code which will impose maintenance burdens on us in the face of future Ruby changes. But TODAY, it is the most performant option for folks who need to use autopush. Revert "resurrect Kgio.autopush support in pure Ruby" and "remove autopush support and make it a no-op" This reverts commits 64dc570f4b99f68b5ed792b36e7e8abc3df74927 and 4347980fa66115425fa8b765353c8b1bfe5dec24.
2015-10-09resurrect Kgio.autopush support in pure Ruby
This avoids breaking compatibility for existing apps, but is less performant (although safer and more resilient to future changes in Ruby) than the previous C version.
2015-09-06kgio 2.10.0 - slimming down... v2.10.0
The largely-unused autopush functionality is now a no-op. Existing applications will probably not notice, and are better off using MSG_MORE anyways if they're on Linux. Our poll(2) wrapper now uses rb_hash_clear if available, reducing global method cache dependence. shortlog of changes since 2.9.3: README: remove reference to Rainbows! writev: update comment on preserving errno poll: avoid rb_funcall for rb_hash_clear minor doc updates remove autopush support and make it a no-op HACKING: update URL for Message-ID lookup
2015-09-02HACKING: update URL for Message-ID lookup
Prefer to use our own site since it is free of images+JavaScript and may load faster if somebody is already reading bogomips.org and has an open connection and hot DNS cache entry.
2015-08-13remove autopush support and make it a no-op
Maintaining global state in a library like kgio is ugly, and it is not optimal from a performance standpoint compared to using MSG_MORE. TCP_CORK and TCP_NOPUSH require extra syscalls so it still offers sub-optimal performance compared to MSG_MORE. Instead, server developers should use MSG_MORE if their OS supports it (and should add MSG_MORE to their OS if lacking it).
2015-08-12minor doc updates
Ruby version changes, dropping Rubinius and MRI 1.8 support, and clarifying a few other things. "Linux kernel" coding style is probably a more accurate of what we've always used as the style is probably better known than K&R nowadays (and we do try to track Linux kernel changes (and email-oriented development style) closely).
2015-08-12poll: avoid rb_funcall for rb_hash_clear
rb_funcall will always be slower, and currently hits the global method cache in MRI.
2015-04-19writev: update comment on preserving errno
Studying malloc implementations for a while, it's completely reasonable for "free" to alter errno when making syscalls to release/compact memory.
2015-01-12README: remove reference to Rainbows!
Rainbows! never took off and is mostly a stagnant project at this point; so avoid confusing people with it.
2015-01-12kgio 2.9.3 - minor cleanups and fixes v2.9.3
Most notably there's a new RB_GC_GUARD to fix an occasional segfault at load time for Ruby 1.8 users thanks to Petr Novodvorskiy for reporting the issue. There's been a new mailing list for a few months now at: kgio-public@bogomips.org No subscription is required, but if you wish to subscribe (existing librelist subscribers must resubscribe) kgio-public+subscribe@bogomips.org There's also a bunch of code cleanups and packaging cleanups. Our website is faster now thanks to olddoc: http://bogomips.org/kgio/ shortlog: test/lib_read_write: fix trywritev blocking test new mailing list info: kgio-public@bogomips.org relax license to allow LGPLv2.1 or later gemspec: modernize for more recent rubygems doc: switch to olddoc remove references to rubyforge and ancient Rubies TODO: updates for the future of kgio tryopen: add RB_GC_GUARD for Ruby 1.8 LICENSE: prefer URL to FSF address cleanup packaging harder fixup -Wshorten-64-to-32 warnings cleanup: avoid shadowing rb_str_subseq cleanup: avoid shadowing rb_ary_subseq pkg.mk: synchronize with my other projects gemspec: remove invalid rdoc_options gemspec: use SPDX license abbreviation
2015-01-12gemspec: use SPDX license abbreviation
ref: http://spdx.org/licenses/
2015-01-12gemspec: remove invalid rdoc_options
No longer needed for olddoc
2015-01-12pkg.mk: synchronize with my other projects
We'll get EXTCONF_ARGS support as well as a muscle-memory-friendly "make check" alias.
2015-01-10cleanup: avoid shadowing rb_ary_subseq
Define a MY_ARY_SUBSEQ macro which checks arg counts correctly and avoids throwing off people who may potentially want to debug this code.
2015-01-10cleanup: avoid shadowing rb_str_subseq
Define a MY_STR_SUBSEQ macro which checks arg counts correctly and avoids throwing off people who may potentially want to debug this code.
2015-01-10fixup -Wshorten-64-to-32 warnings
These are emitted by clang on a Ubuntu Trusty amd64 system. clang version 3.5-1ubuntu1 (trunk) (based on LLVM 3.5)
2015-01-10cleanup packaging harder
We don't need references to RubyForge or old images crap.
2015-01-09LICENSE: prefer URL to FSF address
The FSF has and may move again physically, so the URL should be more future-proof.
2015-01-09tryopen: add RB_GC_GUARD for Ruby 1.8
Calling rb_intern(RSTRING_PTR(err)) was unsafe as the `err' value could be GC-ed inside rb_intern. This only affected Ruby 1.8 as Errno.constants returns an array of Symbols under 1.9+ Thanks to Petr Novodvorskiy for reporting the issue. ref: <CAHGF7iJk9-wK5WbSiAgQaRye7y2RJttLBpykRBpnKkxFi=ASHg@mail.gmail.com> Cc: Petr Novodvorskiy <nidd@skytap.com> Cc: Lara Martin <lmartin@skytap.com> Cc: Nick Astete <nastete@skytap.com>
2015-01-09TODO: updates for the future of kgio
The future of this project is to have no future.
2015-01-09remove references to rubyforge and ancient Rubies
2015-01-09doc: switch to olddoc
wrongdoc was difficult to maintain because of the tidy-ffi dependency and the HTML5 changes in Darkfish could not be handled well by Tidy. olddoc is superior as it generates leaner HTML which loads faster, requires less scrolling and less processing power to render. Aesthetic comparisons are subjective of course but completely unimportant compared to speed and accessibility.
2014-11-17gemspec: modernize for more recent rubygems
License field is commonly supported nowadays, and Rubyforge is dead. Note: wrongdoc will be replaced with something more old-fashioned :)
2014-11-17relax license to allow LGPLv2.1 or later
In case I'm hit by a bus, the lesser evil is to allow the FSF to update our license than to be stuck as LGPLv3-only in the future.
2014-11-17new mailing list info: kgio-public@bogomips.org
You may (optionally) subscribe to the new mailing list at: kgio-public+subscribe@bogomips.org If your ISP prevents you from using port 25, port 587 (submission) is open on bogomips.org. You may use Tor if you do not wish to expose your IP when using port 587. Any HTML mail will be flagged as spam, so please do not send it and waste storage and bandwidth on it. Basic, old-fashioned mailing list conventions apply: no top-posting, trim replies, attribute your quotes, short signatures, etc. This existing list will operate in public-inbox "hijack mode": the new address is subscribed to the old librelist, so any messages sent to the librelist are automatically archived to the new public-inbox. Of course, not much happens here, anyways, so nobody notices :) Background: Over the years, I've come to disagree with the subscription-required posting policy of librelist. Combined with disabling of rsync archives, one of my main reasons for choosing librelist back in the day are gone. Lately, I've also been working on public-inbox, http://public-inbox.org/ an "archives-first" approach to mailing lists using git. ssoma (git) archives are available at: git://bogomips.org/kgio-public/ The ssoma format is described at http://ssoma.public-inbox.org/ HTML archives are going to http://bogomips.org/kgio-public/ All archives imported from gmane, and posts to this librelist also go there.
2014-04-09test/lib_read_write: fix trywritev blocking test
penultimate return value may be a subarray for writev-related routines, not a string. Caught by a pre-upload check by Christian Hofstaedtler on the debian-ruby list for kgio 2.9.1 Tested-by: Christian Hofstaedtler <zeha@debian.org> Cc: Hleb Valoshka <375gnu@gmail.com> Cc: <debian-ruby@lists.debian.org> Cc: Yura Sokolov <funny.falcon@gmail.com>
2014-02-15kgio 2.9.2 - avoid deprecated/removed function v2.9.2
This release is for compatibility with future releases of mainline ruby, as rb_thread_blocking_region is removed in r44955 of ruby trunk This also avoids deprecation warnings fo rb_thread_blocking_region 2.0 and 2.1.
2014-02-15avoid deprecated rb_thread_blocking_region on MRI 2.x
We've finally figured out how to avoid warnings when building on C Ruby 2.x
2014-02-08prepare for rb_thread_blocking_region removal
It'll be OK to use rb_thread_call_without_gvl when rb_thread_blocking_region is not detectable at all. We still use rb_thread_blocking_region for Ruby 2.0-2.1 because rb_thread_call_without_gvl was detectable in 1.9.3, but not usable as an internal symbol. ref: https://bugs.ruby-lang.org/issues/9502
2014-02-05kgio 2.9.1 - various Ruby 1.8.7 fixes v2.9.1
Thanks to Christopher Rigor for this release. Eric Wong (2): only define and test kgio_syssend on 1.9+ various 1.8.7 fixes
2014-02-05various 1.8.7 fixes
Some errors in the code reorganization caused some compatibility code to be dropped :x
2014-02-05only define and test kgio_syssend on 1.9+
Reported-by: Christopher Rigor <crigor@gmail.com>
2014-02-04kgio 2.9.0 - cleanups, bug fixes, minor improvements v2.9.0
This adds a new kgio_syssend method for Ruby 1.9+ which behaves like BasicSocket#send, but will not raise exceptions on EAGAIN. Eric Wong (12): test_poll: remove race prone test_poll_EINTR_changed test tryopen: remove RARRAY_PTR usage in init read_write: remove the rest of RARRAY_PTR usage my_writev: stylistic fixes Rakefile: kill raa_update task avoid downsizing casts connect: constify RSTRING-related things set RSTRING_MODIFIED where appropriate for Rubinius split read_write.c into {read,write,writev}.c add kgio_syssend method to wrap send(2) write: correct check for various blocking regions tryopen: additional debug information for bad Errno values Hleb Valoshka (1): Don't use deprecated api
2014-02-04tryopen: additional debug information for bad Errno values
In case users run into the same problem in the future. ref: http://mid.gmane.org/20131227074129.GA6381@dcvr.yhbt.net
2014-02-04write: correct check for various blocking regions
This will allow us to support past/future Rubies without rb_thread_io_blocking_region but still have other ways of releasing GVL.
2014-02-04add kgio_syssend method to wrap send(2)
This behaves like kgio_trywrite on GNU/Linux, but allows extra flags to be specified. The main purpose of this is to support use of the MSG_MORE flag on GNU/Linux.
2014-02-04split read_write.c into {read,write,writev}.c
This helps make our code more manageable, as well as isolating RSTRING_MODIFIED usage to files which actually need it. writev.c can eventually be fixed to avoid modifying RSTRING pointers, but write.c can already benefit from const RSTRING_PTR values right away.
2014-02-04set RSTRING_MODIFIED where appropriate for Rubinius
Not yet tested, but it makes sense to do this.
2014-02-04connect: constify RSTRING-related things
This should enforce correctness with our non-use of RSTRING_MODIFIED in this file, hopefully allowing Rubinius to optimize better.
2014-01-20avoid downsizing casts
It's always safe to cast a 32-bit value to a 64-bit value, but compilers can warn going the other way (because VALUE is a pointer). Tested with `ruby -v` ruby 2.2.0dev (2014-01-19 trunk 44646) [x86_64-linux] which enables -Wpointer-to-int-cast
2014-01-20Don't use deprecated api
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-09-30Rakefile: kill raa_update task
RAA is dead
2013-09-25my_writev: stylistic fixes
Rename 'str' to 'ary', as that's the whole point of supporting writev... Also, long lines need to be wrapped at 80 columns
2013-09-25read_write: remove the rest of RARRAY_PTR usage
I have not benchmarked this, but this should not make a difference as far as performance goes. This should also allow better performance of better GCs in Ruby 2.1.0 and Rubinius.
2013-09-25tryopen: remove RARRAY_PTR usage in init
This is trivially non-performance-critical, and can only help with advanced GCs in Ruby 2.1.0 and Rubinius
2013-09-25test_poll: remove race prone test_poll_EINTR_changed test
We haven't figured out a way to reliably test this w/o races, so lets just remove it for now and trust it works by reading the C code. ref: <CAAB-KcnpvcG6=OZNsBmvv440OHfCWs6-eDD7L6oD=ziCRXPHLA@mail.gmail.com>
2013-09-11kgio 2.8.1 - minor improvements and test fixes v2.8.1
Improved error reporting for kgio_accept/kgio_tryaccept. Minor size reduction throughout. There are also several test case fixes for race conditions. Thanks to Hleb Valoshka and the Debian project for all the help with this release! Eric Wong (7): check syscall returns against < 0 instead of == -1 accept: more informative exception on unknown family test_tryopen: skip EACCES test when euid == 0 test/lib_read_write: account for larger-than-normal pipes test_poll: avoid potentially thread-unsafe test test_poll: preserve original trap(:USR1) handler test_poll: be less dependent on signal handler ordering Hleb Valoshka (4): Change prefix of temporary sockets to prevent races Don't dump 20M in case of failure Create own directory for every unix socket in unit tests Close tempfile and unlink it immediately.