public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Aiko Barz <aiko@chroot.de>
To: linux-kernel@vger.kernel.org
Subject: sendfile/splice - Non-blocking input?
Date: Mon, 30 May 2011 10:45:59 +0200	[thread overview]
Message-ID: <20110530084559.GA19320@wind> (raw)

Hello,

is sendfile/splice completely non-blocking on the input side?

I am writing a small webserver for educational reasons. I use epoll to
deal with the network part. From what I have read, I have to avoid
blocking code under all circumstances. And the linux implementation
of sendfile seems to block until the file enters the pagecache.

Most of the docs are not completely up to date. I figured out, that
sendfile is now a frontend for splice. So, does it still block?

Or differently asked: May I call sendfile directly from the few epoll
threads or do I have to execute sendfile/splice within independent
worker threads?

Kind regards,
	Aiko Barz
-- 
:wq ✉

                 reply	other threads:[~2011-05-30  8:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

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

  git send-email \
    --in-reply-to=20110530084559.GA19320@wind \
    --to=aiko@chroot.de \
    --cc=linux-kernel@vger.kernel.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox