Re: Plans for gnome-vfs replacement
- From: Hans Petter Jansson <hpj novell com>
- To: Alexander Larsson <alexl redhat com>
- Cc: Paolo Borelli <pborelli katamail com>, "gtk-devel-list gnome org" <gtk-devel-list gnome org>, Tim Janik <timj imendio com>, Paolo Maggi <paolo gnome org>, "gnome-vfs-list gnome org" <gnome-vfs-list gnome org>
- Subject: Re: Plans for gnome-vfs replacement
- Date: Wed, 27 Sep 2006 16:10:24 -0400
On Wed, 2006-09-27 at 09:06 +0200, Alexander Larsson wrote:
> On Tue, 2006-09-26 at 19:01 -0400, Hans Petter Jansson wrote:
> > On Mon, 2006-09-25 at 13:14 +0200, Alexander Larsson wrote:
> > > The way I had planned this was to always use true async i/o when talking
> > > to the vfs daemon via sockets (easy), but implement local async i/o
> > > using threads. If glib threads are not initialized we'd just fall back
> > > to doing blocking "async" calls.
> > You could use AIO on Linux and the equivalent on BSD, if you think it's
> > worth the effort. Flow will have an AIO-based implementation eventually.
> Unfortuantely the linux support isn't good enough. I talked to some
> kernel people, and it would seem this is still pretty much the status
> wrt posix aio:
> In particular, we would need fixes for at least restrictions 1, 5 and 7.
I think restriction 1 is the most serious for us, but we can work around
it if we:
- Always manage our own FD life cycles (i.e. no user-provided FDs, which
is a good idea for portability too).
- Copy/move data into aligned buffers.
I don't consider 5 and 7 blockers. We can work around 5 with no-op
priorities (much as we do for threads) and 7 by keeping the state of
canceled operations around until the operation completes.
Then this can be fixed under the hood when the kernel gets its shit
Of course, just using threads is a lot easier. The "generic Unix-like"
implementation I wrote for Flow uses threads for file I/O. The AIO
implementation will be a Linux-specific bonus, for when the more
important stuff is done.
"...you cut a piece, and as you're taking it off of the fork the
main piece of the filet may be floating up out of the plate, but
you stab it with your fork and put it back down in, and if you
do it carefully, the surface tension of the gravy will keep it
- Russell Schweickart
] [Thread Prev