Date | Commit message (Collapse) |
|
bogomips.org is going away since .org isn't going to
be affordable, anymore. While we're at it, stop requiring
olddoc to just build the gem.
|
|
This should allow faster instructions to be used in some cases.
Technically this may be less pedantically correct, but there is
enough existing code out there which does the same thing to
discourage kernel/libc developers from overloading negative
return values.
...And glibc even favors comparison against zero, too.
|
|
This reduces stack usage in some places, perhaps providing a
miniscule improvement in GC performance.
struct before after difference
splice_args 48 40 8
vmsplice_args 32 24 8
|
|
The public-inbox + mlmmj setup on bogomips.org allows posting
without subscription and offers downloadable archives via git.
The lack of rsyncable archives on librelist nowadays and
subscription-required nature of librelist are points against it.
Repliers are now encouraged to Cc: all recipients (using the
reply-all function of their mail client) since many readers are
not subscribed.
This project has never accepted or encouraged HTML email, but
librelist accepted it. The bogomips.org mail server is
configured to treat HTML mail as spam, so do not send HTML mail
if you expect a response.
Users who wish to subscribe may send a message to:
ruby-io-splice+subscribe@bogomips.org
Similarly, they may unsubscribe via:
ruby-io-splice+unsubscribe@bogomips.org
HTTP archives are available via:
http://bogomips.org/ruby-io-splice/
ssoma users may also use: git://bogomips.org/ruby-io-splice
(see README change)
Old messages to the librelist addresses will continue to
get routed to the new mailing list.
ref: http://public-inbox.org/
|
|
rb_thread_blocking_region is not in ruby trunk as of r44955
|
|
This functionality should not be implemented in Ruby, at least.
This flag could also conflict with future flags used by the
underlying syscalls.
|
|
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
|
|
In case somebody finds vmsplice useful in Ruby, we avoid incurring
the performance loss from RARRAY_PTR under Ruby 2.1.0 and Rubinius.
However, I still haven't found a useful use of vmsplice under
Ruby (or any high-level languages).
|
|
This prevents a file descriptor leak in case another thread
forks and execs while we are in the middle of loading. This
places a hard dependency on pipe2, but pipe2 appeared in Linux
before pipe size modification.
|
|
While vmsplice is hardly useful, its FD-closed-while-GVL-less
handling should be as good as our splice and tee wrappers.
|
|
Newer GCC more aggressively optimizes stack allocations away,
so we need to avoid passing out-of-scope addresses to vmsplice.
Not that vmsplice is useful in Ruby...
|
|
.org makes us look less commercial, which may be
important to some folks. Yes, this project is
run by a dirty hippie.
|
|
The uname comparison is fragile and we can better
detect this during the Init_* function by just using
a pipe.
|
|
This is the same value haproxy has to work around the same
issue on 64-bit platforms.
ref: a9de333aa58e6cb76f08a50e8ba2c5931184068f in
http://git.1wt.eu/git/haproxy.git
|
|
We should warn our users to avoid a blocking splice() from a
socket into a pipe if the socket buffers are full unless there's
a blocking read/splice on the other end of the pipe.
|
|
We support both, but IO objects are easier to use so
refer to those in the documentation.
|
|
This allows splice-in-full and tee-in-full behavior
to simplify user code.
|
|
Easier to read this way since it matches upstream
functions.
|
|
We don't want to retry with the same FD if it somehow
got closed and reopened in a different thread. We
could possibly have Errno::EBADF, too, but
rb_thread_io_blocking_region doesn't allow multiple
file descriptors...
|
|
No chance in hell a file descriptor can be a Bignum...
|
|
This makes things consistent with Ruby core IO methods
|
|
I didn't know mkmf at the time :<
|
|
HALP!
|
|
And yes, encourage them for non-blocking I/O users.
|
|
For consistency with all of our other methods.
|
|
This allows more-efficient use of non-blocking I/O with
tee(2) and will return :EAGAIN instead of generating an
expensive Errno::EAGAIN exception.
|
|
It makes more sense this way if non-blocking I/O is expected.
|
|
No point in requiring the flags argument if it's going to be
zero, so default them to zero if they're unset.
|
|
Long lines bother me
|
|
Caught when compiling with the CFLAGS of Ruby 1.9.3dev
|
|
This reduces the cost of EAGAIN and EOF since they
are not considered exceptional conditions.
|
|
These are friendly wrappers around F_GETPIPE_SZ
and F_SETPIPE_SZ fcntl()s in Linux 2.6.35.
|
|
There is a new IO::Splice.copy_stream method which is similar to
the IO.copy_stream method in 1.9 core, but uses splice()
internally to avoid copies to userspace in situations where
sendfile() is not possible.
With Linux 2.6.35 (and header files to match), we will also
export the F_GETPIPE_SZ and and F_SETPIPE_SZ constants so
they can be used with fcntl() to resize pipe buffers.
The documentation is also updated to reflect the returned
usefulness of the IO::Splice::F_MOVE constant for FUSE
filesystems under Linux 2.6.35.
I've also relicensed to LGPLv2.1+ (from LGPLv3-only) to allow
bundling with GPLv2-only applications (I'm currently the sole
copyright holder).
Signed-off-by: Eric Wong <normalperson@yhbt.net>
|
|
It seems needed for Rubinius
|
|
This could be useful if a Ruby implementation eventually gives
us page-aligned strings that we can IO::Splice::F_GIFT
|
|
One day soon (2.6.35), we'll be able to resize pipes. We may
support this independently of the C library since that can take
a few months/years to catch up, taking distro release cycles
into account, too.
|
|
FUSE devices will finally gain splice() support and also
support SPLICE_F_MOVE in 2.6.35. SPLICE_F_MOVE is still
ignored for non-FUSE devices.
|
|
|
|
This should be more convenient to use than having
to remember to call "fileno" every time...
|
|
We can't reliably/efficiently know if the non-pipe descriptor
may block, and releasing the GVL is fairly cheap under Linux.
|
|
|
|
vmsplice-ing a partial array of strings into a pipe is not very
useful under Ruby, so wait for I/O availability if the pipe is
full. This code/logic was also contributed to the io-extra
gem (by me) for the IO.writev implementation.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
|
|
|
|
We never create IO::Splice objects :x
|
|
|