mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Aaron Wiebe <epiphani@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: slow open() calls and o_nonblock
Date: Mon, 04 Jun 2007 15:46:00 -0400	[thread overview]
Message-ID: <1180986360.6657.24.camel@heimdal.trondhjem.org> (raw)
In-Reply-To: <e7ca40f70706040926i737cc0dax3f35d89e9fb0104f@mail.gmail.com>

On Mon, 2007-06-04 at 12:26 -0400, Aaron Wiebe wrote:
> Actually, lets see if I can summarize this more generically... I
> realize I'm suggesting something that probably would be a massive
> undertaking, but ..
> 
> Regular files are the only interface that requires an application to
> wait.  With any other case, the nonblocking interfaces are fairly
> complete and easy to work with.  If userspace could treat regular
> files in the same fashion as sockets, life would be good.
> 
> I admittedly do not understand internal kernel semantics in the
> differences between a socket and a regular file.  Why couldn't we just
> have a different 'socket type' like PF_FILE or something like this?
> 
> Abstracting any IO through the existing interfaces provided to sockets
> would be ideal from my perspective.  The code required to use a file
> through these interfaces would be more complex in userspace, but the
> abstraction of the current open() itself could simply be an aggregate
> of these interfaces without a nonblocking flag.
> 
> It would, however, fix problems around issues with event-based
> applications handling events from both disk and sockets.  I can't
> trigger disk read/write events in the same event handlers I use for
> sockets (ie, poll or epoll).  I end up having two separate event
> handlers - one for disk (currently using glibc's aio thread kludge),
> and one for sockets.
> 
> I'm sure this isn't a new idea.  Coming from my own development
> backround that had little to do with disk, I was actually surprised
> when I first discovered that I couldn't edge-trigger disk IO through
> poll().
> 
> Thoughts, comments?

Unless you're planning on rearchitecting the entire VFS lookup and
permissions code, you would basically have to fall back onto having a
pool of service threads actually perform the I/O. That can just as
easily be done today in userland.

AFAICS, syslets should give you the means to implement a more scalable
scheme, but we'll have to wait and see if/when those are ready for
kernel inclusion.

Cheers
  Trond


  reply	other threads:[~2007-06-04 19:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-03 18:52 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
2007-06-04 16:26       ` Aaron Wiebe
2007-06-04 19:46         ` Trond Myklebust [this message]
2007-06-04 20:32   ` David Schwartz
2007-06-04 14:39 ` Aaron Wiebe
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=1180986360.6657.24.camel@heimdal.trondhjem.org \
    --to=trond.myklebust@fys.uio.no \
    --cc=epiphani@gmail.com \
    --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

all inboxes | Powered by JetHome®