linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@purestorage.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>,
	linux-man <linux-man@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: open(2) manpage and O_NONBLOCK
Date: Sun, 27 Mar 2016 22:04:50 -0700	[thread overview]
Message-ID: <20160328050450.GA27411@cork> (raw)
In-Reply-To: <20160328040845.GT17997@ZenIV.linux.org.uk>

On Mon, Mar 28, 2016 at 05:08:45AM +0100, Al Viro wrote:
> On Mon, Mar 28, 2016 at 04:58:33PM +1300, Michael Kerrisk (man-pages) wrote:
> > > blocking memory allocation:
> > >         f = kmem_cache_zalloc(filp_cachep, GFP_KERNEL);
> > 
> > For how long might this block, though?
> 
> Not much, usually.  Finding the file, though, can bloody well take a _long_
> time - put it behind an automount from a slow server and we might be easily
> talking about minutes, if not longer.

Another example that bit me in the past is scsi devices checking for
media presence.  If any part of your storage stack drops the cdb, you
have to wait for a scsi timeout, usually 30s.

Disk events commonly cause delays around the half-second mark.  I
haven't gone through the code yet to see what the actual limits are.
Half a second might already be too long for some realtime
applications.

J�rn

--
When I am working on a problem I never think about beauty.  I think
only how to solve the problem.  But when I have finished, if the
solution is not beautiful, I know it is wrong.
-- R. Buckminster Fuller

      reply	other threads:[~2016-03-28  5:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21 20:23 open(2) manpage and O_NONBLOCK Jörn Engel
2016-03-28  3:58 ` Michael Kerrisk (man-pages)
2016-03-28  4:08   ` Al Viro
2016-03-28  5:04     ` Jörn Engel [this message]

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=20160328050450.GA27411@cork \
    --to=joern@purestorage.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=viro@ZenIV.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).