From: "Aaron Wiebe" <epiphani@gmail.com>
To: "Trond Myklebust" <trond.myklebust@fys.uio.no>
Cc: linux-kernel@vger.kernel.org
Subject: Re: slow open() calls and o_nonblock
Date: Mon, 4 Jun 2007 11:59:22 -0400 [thread overview]
Message-ID: <e7ca40f70706040859g323d813fy3d7e741de8f190dc@mail.gmail.com> (raw)
In-Reply-To: <1180971726.17737.36.camel@heimdal.trondhjem.org>
On 6/4/07, Trond Myklebust <trond.myklebust@fys.uio.no> wrote:
>
> So exactly how would you expect a nonblocking open to work? Should it be
> starting I/O? What if that involves blocking? How would you know when to
> try again?
Well, theres a bunch of options - some have been suggested in the
thread already. The idea of an open with O_NONBLOCK (or a different
flag) returning a handle immediately, and subsequent calls returning
EAGAIN if the open is incomplete, or ESTALE if it fails (with some
auxiliary method of getting the reason why it failed) are not too far
a stretch from my perspective.
The other option that comes to mind would be to add an interface that
behaves like sockets - get a handle from one system call, set it
nonblocking using fcntl, and use another call to attach it to a
regular file. This method would make the most sense to me - but its
also because I've worked with sockets in the past far far more than
with regular files.
The one that would take the least amount of work from the application
perspective would be to simply reply to the nonblocking open call with
EAGAIN (or something), and when an open on the same file is performed,
the kernel could have performed its work in the background. I can
understand, given the fact that there is no handle provided to the
application, that this idea could be sloppy.
I'm still getting caught up on some of the other suggestions (I'm
currently reading about the syslets work that Zach and Ingo are
doing), and it sounds like this is a common complaint that is being
addressed through a number of initiatives. I'm looking forward to
seeing where that work goes.
-Aaron
next prev parent reply other threads:[~2007-06-04 15:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-03 18:52 slow open() calls and o_nonblock Aaron Wiebe
2007-06-03 19:16 ` Davide Libenzi
2007-06-03 23:56 ` John Stoffel
2007-06-04 1:05 ` Aaron Wiebe
2007-06-04 1:20 ` Neil Brown
2007-06-04 13:59 ` Aaron Wiebe
2007-06-04 1:25 ` Bernd Eckenfels
2007-06-04 0:27 ` David Schwartz
2007-06-04 1:05 ` Al Viro
2007-06-04 1:19 ` Bernd Eckenfels
2007-06-04 13:49 ` Alan Cox
2007-06-04 14:04 ` Aaron Wiebe
2007-06-04 14:17 ` John Stoffel
2007-06-04 14:24 ` Aaron Wiebe
2007-06-04 14:20 ` Aaron Wiebe
2007-06-04 15:42 ` Trond Myklebust
2007-06-04 15:59 ` Aaron Wiebe [this message]
2007-06-04 16:26 ` Aaron Wiebe
2007-06-04 19:46 ` Trond Myklebust
2007-06-04 20:32 ` David Schwartz
2007-06-04 14:39 ` Aaron Wiebe
-- strict thread matches above, loose matches on Subject: below --
2007-06-04 3:57 Albert Cahalan
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=e7ca40f70706040859g323d813fy3d7e741de8f190dc@mail.gmail.com \
--to=epiphani@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=trond.myklebust@fys.uio.no \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.