qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool
Date: Wed, 10 Dec 2008 18:29:50 +0100
User-agent: Thunderbird 2.0.0.18 (X11/20081119)

>> To solve this in userland without kernel aio we'd need to open (not
>> just dup)
> 
> Why not just dup?  I've implemented this and it seems to work.

unix keeps the file pointer in the (global) file table.  The
(per-process) file descriptor table references the file table.

opening twice gives you two file descriptor table entries referencing
two file table entries.  duping gives you two file descriptors
referencing the *same* file table entry.  Thus the two fds share the
file pointer.

HTH,
  Gerd






reply via email to

[Prev in Thread] Current Thread [Next in Thread]