[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0611030311430.25096@debian.freesoft.org>
Date: Fri, 3 Nov 2006 03:23:35 -0500 (EST)
From: Brent Baccala <cosine@...esoft.org>
To: linux-kernel@...r.kernel.org
Subject: async I/O seems to be blocking on 2.6.15
Hello -
I'm running 2.6.15 (Debian) on a Pentium M laptop, PCI attached ext3
filesystem.
I'm writing my first asynchronous I/O program, and for a while I
thought I was really doing something wrong, but more and more I'm
starting to conclude that the problem might be in the kernel.
Basically, I've narrowed things down to a test program which opens a
large (700 MB) file in O_DIRECT mode and fires off 100 one MB async
reads for the first 100 MB of data. The enqueues take about 5 seconds
to complete, which is also about the amount of time this disk needs to
read 100 MB, so I suspect that it's blocking.
I've gotten the POSIX AIO interface at least tolerably running using
the GLIBC thread-based implementation, but I really want the native
interface working.
I whittled the test program down to use system calls instead of the
POSIX AIO library, and I'm attaching a copy. You put a big file at
'testfile' (it just reads it) and run the program:
baccala@...ian ~/src/endgame$ time ./testaio
Enqueues starting
Enqueues complete
real 0m5.327s
user 0m0.004s
sys 0m0.740s
baccala@...ian ~/src/endgame$
Of that five seconds, it's almost all spent between the two "enqueues"
messages.
If anybody can shed any light on this, I'd appreciate your feedback
direct to cosine@...esoft.org (I don't read the list).
Thank you.
-bwb
Brent Baccala
cosine@...esoft.org
View attachment "testaio.c" of type "TEXT/x-csrc" (1536 bytes)
Powered by blists - more mailing lists