sleepy_penguin RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* [sleepy_penguin PATCH 0/2] splice/tee/copy_file_range support
@ 2016-03-16  3:13 Eric Wong
  2016-03-16  3:13 ` [PATCH 1/2] support the splice(2) and tee(2) syscalls Eric Wong
  2016-03-16  3:13 ` [PATCH 2/2] implement copy_file_range support for Linux 4.5+ Eric Wong
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Wong @ 2016-03-16  3:13 UTC (permalink / raw)
  To: sleepy-penguin; +Cc: ruby-io-splice

Linux 4.5 was just released the other day with
copy_file_range(2) support.  This is similar to splice(2), but
meant to operate on regular files rather than pipes.

copy_file_range(2) does not have glibc support, yet,
so it's only supported on x86-64 and x86, for now.

Blatantly stealing code from the "io_splice" gem, but omitting
vmsplice support for now since I never figured out a good way to
use it in Ruby without a mmap(2) wrapper...

So with that, I'm planning to slowly phase out the "io_splice"
gem since this one absorbs its functionality.  And I will add
vmsplice support here if we end up supporting mmap, somehow.

I also plan to support sendfile as that's another related
syscall to these, but may also support a "bsd_sendfile"
with support for writing header/trailer vectors...

Eric Wong (2):
      support the splice(2) and tee(2) syscalls
      implement copy_file_range support for Linux 4.5+

 .document                     |   1 +
 ext/sleepy_penguin/cfr.c      |  68 +++++++++
 ext/sleepy_penguin/extconf.rb |   5 +
 ext/sleepy_penguin/init.c     |   5 +
 ext/sleepy_penguin/sp_copy.h  |  50 +++++++
 ext/sleepy_penguin/splice.c   | 328 ++++++++++++++++++++++++++++++++++++++++++
 ext/sleepy_penguin/util.c     |   3 +
 test/test_cfr.rb              |  29 ++++
 test/test_splice.rb           | 254 ++++++++++++++++++++++++++++++++
 test/test_splice_eintr.rb     |  34 +++++
 10 files changed, 777 insertions(+)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-02  2:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-16  3:13 [sleepy_penguin PATCH 0/2] splice/tee/copy_file_range support Eric Wong
2016-03-16  3:13 ` [PATCH 1/2] support the splice(2) and tee(2) syscalls Eric Wong
2017-01-02  2:31   ` Eric Wong
2016-03-16  3:13 ` [PATCH 2/2] implement copy_file_range support for Linux 4.5+ Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/sleepy_penguin.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).