ChangeLog in sleepy_penguin-3.1.0 vs ChangeLog in sleepy_penguin-3.1.0.26.g7181
- old
+ new
@@ -1,6 +1,309 @@
ChangeLog from http://bogomips.org/sleepy_penguin.git
+ commit 7181b7e4da11894b59caebc1c864deca06a780b2
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Sun Apr 21 03:48:27 2013 +0000
+
+ epoll: enforce maxevents > 0 before memory allocation
+
+ This prevents overflow and excessive memory usage/OOM error.
+ Note: the kernel enforces this and returns EINVAL anyways,
+ we just do it to prevent OOM here.
+
+ commit 623c6797bcf1f8077c39cdcffb83b9aa25793932
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Sun Apr 21 03:00:20 2013 +0000
+
+ favor comparison against 0 for error checking
+
+ When possible, comparisons against zero require one less load
+ and uses one less register, so this results in smaller code:
+
+ $ ~/linux/scripts/bloat-o-meter before.so after.so
+ add/remove: 0/0 grow/shrink: 0/5 up/down: 0/-57 (-57)
+ function old new delta
+ rm_watch 84 83 -1
+ rb_sp_set_nonblock 80 79 -1
+ add_watch 127 126 -1
+ epwait 692 687 -5
+ s_new 970 921 -49
+
+ This style is favored by major C projects, including glibc.
+
+ Note: since file and file descriptor flags may eventually use
+ more bits of an integer, we continue comparing F_GETFD/F_GETFL
+ return values against -1 to be future proof.
+
+ commit 92b55d65af197218b7653018847b14141cd393de
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Sat Apr 13 11:29:33 2013 +0000
+
+ set close-on-exec by default under Ruby 2.0
+
+ Ruby 2.0 creates file descriptors with the close-on-exec flag
+ specified by default. Unless a user specifies flags explicitly,
+ assume the default is to set the close-on-exec.
+
+ This does not change behavior of Ruby 1.9 and earlier.
+
+ commit 856e3e6706a9ab40047eff22f0ddc9dd40ecdde2
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Sat Apr 13 11:06:39 2013 +0000
+
+ extconf: remove pthread checks
+
+ We no longer need to use pthread_* functionality.
+
+ commit 14141d20e359cc038424fc3d04151df6d5f9de2e
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Sat Apr 13 09:21:00 2013 +0000
+
+ README: update description
+
+ Ruby 2.0 is out and we're compatible. Also, we've always
+ supported EPOLLONESHOT, promote it.
+
+ commit 0337144dc569a8795e562cac4d6071e29c1526ac
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Sat Apr 13 01:14:38 2013 +0000
+
+ doc: rdoc fixes and cleanups
+
+ Our usage of rdoc was incorrect in some places and causing
+ internal methods to become visible.
+
+ commit 3d8e66dfec175de1f402ef9b77c018c6d437fca1
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Sat Apr 13 01:07:05 2013 +0000
+
+ .wrongdoc: add public/private email addresses
+
+ This was forgotten for some reason, no longer.
+
+ commit 78450556becf67a3eb8b0870b38b2c75d99ad96e
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Fri Apr 12 23:54:13 2013 +0000
+
+ epoll: cleanup GVL-release code for Ruby 2.0.0
+
+ rb_thread_blocking_region is deprecated in Ruby 2.0, but
+ rb_thread_io_blocking region is not (and superior for I/O). So we will
+ favor rb_thread_io_blocking_region for now.
+
+ While we're at it, reimplement green-thread-safe (Ruby 1.8) epoll_wait
+ in Ruby instead of C. The extra #ifdefs for 1.8.7 were more prone to
+ bitrot and Ruby code should be easier to follow for Rubyists who care
+ about 1.8.
+
+ commit 4c4a6ae523bc7bac4be0fd4dc104b055161ad260
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Fri Apr 12 02:05:54 2013 +0000
+
+ inotify: thread-safe Inotify#take for rbx
+
+ Rubinius provides a Rubinius.synchronize helper for locking
+ objects which do not otherwise have locks. We need to
+ synchronize Inotify#take access to prevent the internal array
+ from being clobbered.
+
+ This avoids unnecessary locking overhead on MRI which maintains
+ a GVL.
+
+ commit 26ba5806ddf9bce97c55f40c741da7d2e29aafbc
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Fri Apr 12 02:05:53 2013 +0000
+
+ inotify: use thread-local internal buffer
+
+ This gives us thread-safety for the internal buffer. While
+ we're at it, cache-align this buffer to avoid unnecessary
+ overhead when read() writes to it.
+
+ commit 1fdbe4e5e1e46eedf11dbf765bf228bd1a831d09
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Fri Apr 12 20:21:46 2013 +0000
+
+ license + gem packaging cleanups
+
+ require_paths and date are automatically set in modern RubyGems
+ versions. Since we only use modern RubyGems versions, the
+ licenses= accessor is also activated.
+
+ Since the FSF may change mailing addresses again in the future,
+ prefer the web address to point to licenses. This change is
+ acceptable for GNU projects, so it should be for us, too:
+ http://sourceware.org/bugzilla/show_bug.cgi?id=13673
+
+ commit ee7efd4c7b8f1fc10b239e80f3296d943c05e04e
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Fri Apr 12 19:57:47 2013 +0000
+
+ .gitignore: add .rbx
+
+ Rubinius drops this directory on us nowadays
+
+ commit 486cafa9da2dcaf988d9ecdf1b407c7e876a0217
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Fri Apr 12 22:18:59 2013 +0000
+
+ test_epoll_gc: force GC on EMFILE/ENFILE
+
+ This helps avoid test errors on Rubinius where rb_gc() is a noop.
+ Otherwise, we might as well infinite loop on thread-creation to
+ trigger GC.
+
+ commit d4b5c8d7c1abe673915aca8674c5e0b55a0aaffa
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Thu Apr 11 04:17:35 2013 +0000
+
+ avoid ENOMEM checking in common code paths
+
+ ENOMEM from syscalls such as inotify_add_watch and epoll_ctl are
+ from the lack of kernel memory, so even a successful rb_gc() is
+ unlikely to be able to reap memory taken from those slab caches.
+
+ commit 49cb42a42022dffd98fc5b3acdb2dfc7bf5bd156
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Thu Apr 11 04:17:34 2013 +0000
+
+ epoll: cache alignment for per-thread structure
+
+ This probably won't make a huge difference in Ruby, but perhaps
+ one day the unnecessary dirtying of cache lines will affect
+ performance (and we'll be ready when that day comes).
+
+ While we're at it, remove usage of pthread* functions for
+ thread-local variables. The __thread construct from GCC (and
+ also implemented by clang) is much easier-to-use than the
+ pthread_*specific API.
+
+ commit 8f5d890d80d8201681941c61870162b55878933b
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Thu Apr 11 03:38:29 2013 +0000
+
+ epoll: implement thread-safety for mark/flag arrays
+
+ Concurrent modification of Arrays is thread-unsafe and must be
+ protected by a Mutex. eventpoll objects inside the Linux kernel
+ are similarly protected by a (kernel) mutex, and do not need
+ additional locking.
+
+ However, we lock around epoll_ctl here anyways since we must
+ modify our userland arrays after we modify the kernel structure.
+ We must modify userland arrays after the kernel structure to
+ prevent epoll_wait callers from seeing an unreferenced object.
+
+ commit 83b903d3ffc99f0377fee8d051fe23f475591546
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Thu Apr 11 02:58:51 2013 +0000
+
+ split Epoll and Epoll::IO, rewrite Epoll in Ruby
+
+ Epoll::IO is a dangerous, low-level class which is intended
+ for users aware of the GC and fork behavior of epoll in the
+ Linux kernel.
+
+ Rewriting the higher-level Epoll in Ruby makes it easier to
+ maintain, especially since Rubinius has no GVL while running
+ C extensions.
+
+ commit 5bfc2dd29748c559e833ff654b5210067a1d9e91
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Sat Apr 6 00:21:34 2013 +0000
+
+ test_epoll: synchronize writes to the pipe array
+
+ Concurrent modification of the array is not thread-safe.
+
+ commit 0f55aa0caa4846aab8e3a8df85fdea884a317a01
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Sat Apr 6 00:21:00 2013 +0000
+
+ test_epoll: fix timing error in test
+
+ We need to record the time before the thread is spawned for
+ correct timing
+
+ commit 446033931a8051656585bacd6277e9823a3e62e8
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Wed Apr 3 00:28:01 2013 +0000
+
+ util: comment explaining non-use of FIONBIO
+
+ I was about to change this to the FIONBIO here myself before
+ I realized we do not frequently _change_ file flags.
+
+ commit 2f5c82c26aeaf3536deace3521097d3e9eaefc20
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Fri Mar 1 19:50:27 2013 +0000
+
+ reload FD after rb_io_wait_*able functions
+
+ The file descriptor may be closed while GVL is released,
+ so we must reload the descriptor before and after calling
+ rb_io_wait_*able functions.
+
+ We reload before calling rb_io_wait_*able because the GVL was
+ released for the function call (read/write) which triggered
+ EAGAIN.
+
+ We reload after calling rb_io_wait_*able because
+ rb_io_wait_*able releases the GVL, too.
+
+ commit c217412e59dedf0fa98069815c395339007ede6b
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Thu Jan 24 00:45:59 2013 +0000
+
+ epoll: update documentation for multi-threaded use
+
+ We forgot to update this documentation when we released 3.1.0
+
+ commit 34bcf72e526bba8470e4494b1c7d5fd055e7a1ed
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Wed Jan 23 19:43:36 2013 +0000
+
+ epoll: use pthread_once properly
+
+ pthread_once_t must be static to be effective. This bug only
+ affects apps which load sleepy_penguin multiple times.
+
+ commit 9449295d3e6109fb5516a1aa2e6735e2a043a7ab
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Thu Jan 17 21:40:26 2013 +0000
+
+ epoll: add EPOLLWAKEUP constant
+
+ This was added in Linux 3.5 and glibc 2.17
+
+ commit b3fa14976bc41c2daad0b8a6afd74a8212dcb97b
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Thu Jan 17 21:30:30 2013 +0000
+
+ Revert "epoll: avoid EPOLL_CTL_MOD race condition"
+
+ This reverts commit 02e5a91b24983d96b342c007661966495ccdb619.
+
+ This workaround may have unintended side-effects for apps using
+ EPOLL_CTL_DEL.
+
+ commit 02e5a91b24983d96b342c007661966495ccdb619
+ Author: Eric Wong <normalperson@yhbt.net>
+ Date: Thu Jan 3 03:52:31 2013 +0000
+
+ epoll: avoid EPOLL_CTL_MOD race condition
+
+ Until everybody updates to a version of the Linux kernel with
+ this fix, we need to enable a workaround for older kernels using
+ EPOLL_CTL_DEL + EPOLL_CTL_ADD to emulate EPOLL_CTL_MOD behavior.
+
+ This race condition is fixed in Linux upstream
+ commit 128dd1759d96ad36c379240f8b9463e8acfd37a1 and included in
+ Linux v3.8-rc2 and later.
+
+ This fix will likely be backported to stable and vendor kernels,
+ so we'll whitelist them as we learn of them.
+
commit db1eb67855149050e448c63df12ade22135916cd
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed May 2 08:56:22 2012 +0000
sleepy_penguin 3.1.0 - minor fixes and features