sleepy_penguin RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: sleepy-penguin@bogomips.org
Cc: ruby-io-splice@bogomips.org
Subject: [sleepy_penguin PATCH 0/2] splice/tee/copy_file_range support
Date: Wed, 16 Mar 2016 03:13:38 +0000	[thread overview]
Message-ID: <20160316031340.7164-1-e@80x24.org> (raw)

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(+)


             reply	other threads:[~2016-03-16  3:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16  3:13 Eric Wong [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/sleepy_penguin/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160316031340.7164-1-e@80x24.org \
    --to=e@80x24.org \
    --cc=ruby-io-splice@bogomips.org \
    --cc=sleepy-penguin@bogomips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).