lkml.org 
[lkml]   [2007]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: slow open() calls and o_nonblock
On Sun, 3 Jun 2007, Aaron Wiebe wrote:

> (ps. having come from the socket side of the fence, its incredibly
> frustrating to be unable to poll() or epoll regular file FDs --
> Especially knowing that the kernel is translating them into a TCP
> socket to do NFS anyway. Please add regular files to epoll and give
> me a way to do the opens in the same fasion as connects!)

You may want to follow Ingo and Zach work on syslets/threadlets. If that
goes in, you can make *any* syscall asynchronous.
I ended up writing a userspace library, to cover the same exact problem
you have:

http://www.xmailserver.org/guasi.html

I basically host an epoll_wait (containing all my sockets, pipes, etc)
inside a GUASI async request, where other non-pollable async requests are
hosted. So guasi_fetch() becomes my main event collector, and when the
epoll_wait async request show up, I handle all the events in there.
This is a *very-trivial* HTTP server using such solution (coroutines,
epoll and GUASI):

http://www.xmailserver.org/cghttpd-home.html



- Davide


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-06-03 21:19    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site