[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool
From: |
Andrea Arcangeli |
Subject: |
Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool |
Date: |
Wed, 10 Dec 2008 17:44:01 +0100 |
On Tue, Dec 09, 2008 at 10:01:34AM -0600, Anthony Liguori wrote:
> Yes, that's what I'm going to do before committing it.
I've been hacking on this too, just to push out a full tested patchset
without the _em badness... problem is if we use more than one thread,
there's a thread race between lseek and writev, pread/pwrite don't
have the issue as they store the pos on the kernel stack, and they
don't pass through the shared file->f_pos. We'd really need
preadv/pwritev...
To solve this in userland without kernel aio we'd need to open (not
just dup) the file in each thread, then the file->f_pos will become
thread local and we can cache the last lseek value and avoid the lseek
syscall for contiguous I/O. Or we need to reduce the number of threads
to 1 per fd (screwing seeking I/O). kernel aio wouldn't have this
trouble and a single fd/file would be enough, but that would only work
on linux.
- [Qemu-devel] [RFC] Replace posix-aio with custom thread pool, Anthony Liguori, 2008/12/05
- Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool, Blue Swirl, 2008/12/06
- Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool, Gerd Hoffmann, 2008/12/09
- Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool, Anthony Liguori, 2008/12/09
- Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool,
Andrea Arcangeli <=
- Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool, Anthony Liguori, 2008/12/10
- Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool, Gerd Hoffmann, 2008/12/10
- Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool, Anthony Liguori, 2008/12/10
- Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool, Andrea Arcangeli, 2008/12/10
- Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool, Andrea Arcangeli, 2008/12/11
- Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool, Gerd Hoffmann, 2008/12/11
- Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool, Andrea Arcangeli, 2008/12/11
- Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool, Gerd Hoffmann, 2008/12/11
- Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool, Andrea Arcangeli, 2008/12/11
- Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool, Gerd Hoffmann, 2008/12/11