AIO for SG
Guys,
Is there a patch available which adds the aio
interface to SG? (aio_read, aio_complete etc)
TIA,
Mark
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
Quoted 3 lines · Mark Lobo
Guys,
Is there a patch available which adds the aio
interface to SG? (aio_read,aio_completeetc)
Mark,
I have got one but it's against lk 2.5.69 . It is relatively simple (i.e. supports aio_write and aio_complete but not aio_read).
If I get time I'll send a patch against lk 2.6.0-test9 later today.
Doug Gilbert
Quoted 3 lines · Mark Lobo
Guys,
Is there a patch available which adds the aio
interface to SG? (aio_read,aio_completeetc)
Mark,
I have ported the aio support from lk 2.5.69 to my latest version of sg which I sent to this list a few days ago.
The 2 attachments:
1) incremental against my patch a few days ago. This makes it simpler to see the changes associated with aio
2) against the version of sg found in lk 2.6.0-test9 (so it includes my cdev and seqfile patches)
The sg3_utils-1.05 package found at http://www.torque.net/sg
has a file called sg_simple_aio.c ** in its "examples" directory. You need libaio to link it. Links ok with libaio-0.3.92 but libaio-0.3.93 gives undefines (seems to be related to i64, ppc etc support added in 0.3.93, strange).
** beware of the "sleep(3)" before read() [best remove it].
Doug Gibert
Douglas,
Thanks, I will definitely try it out.
I had one question about the aio calls though. I was looking through the kernel sources after applying the patch, and then looked at the examples you have provided. How does the io_setcallback work? The kiocb and the aiocb structure had no way to specify a callback function in the kernel/usermode. What exactly does aio_complete do and how is the callback done? Atleast until SG, there was no way of calling back, didnt look anywhere else.How does it work from the kernel?
TIA
Mark
Quoted 30 lines · --- Douglas Gilbert
Quoted 3 lines · Mark Lobo
Guys,
Is there a patch available which adds the aio
interface to SG? (aio_read,aio_completeetc)Mark,
I have ported the aio support from lk 2.5.69 to my latest
version of sg which I sent to this list a few days ago.The 2 attachments:
1) incremental against my patch a few days ago.
This makes
it simpler to see the changes associated with
aio
2) against the version of sg found in lk
2.6.0-test9 (so
it includes my cdev and seqfile patches)The sg3_utils-1.05 package found at
http://www.torque.net/sg
has a file calledsg_simple_aio.c** in its "examples" directory.
You need libaio to link it. Links ok with libaio-0.3.92 but
libaio-0.3.93 gives undefines (seems to be related to i64, ppc
etc support added in 0.3.93, strange).
Quoted 8 lines
** beware of the "sleep(3)" before
read()[best
remove it].Doug Gibert
ATTACHMENT part 2 application/x-gzip
name=sg_aio_260t9dpg.diff.gz
Quoted 1 line
ATTACHMENT part 3 application/x-gzip
name=sg_aio_260t9.diff.gz
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree