All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] Clarification of UML and AIO?
@ 2005-07-12 20:57 Allan Graves
  2005-07-12 22:03 ` Jeff Dike
  0 siblings, 1 reply; 4+ messages in thread
From: Allan Graves @ 2005-07-12 20:57 UTC (permalink / raw)
  To: user-mode-linux-devel

[-- Attachment #1: Type: text/plain, Size: 1381 bytes --]

Hi guys...  Trying to do some AIO stuff here, and got a question.  
Perhaps I'm not understanding how AIO works in UML...  Could someone 
perhaps give me an explanation of why we end up in pread, instead of 
aio?  Does UML not support AIO through its block device driver?
Thank you,
Allan

The simple test program:

#include <aio.h>
#include <errno.h>
#include <fcntl.h>

main()
{
       struct aiocb aiocb;
       int fd;
       char buf[1024];

       fd = open("/tmp/outfile", O_RDONLY);
       perror("open");

       bzero(&aiocb, sizeof(aiocb));
       aiocb.aio_fildes = fd;
       aiocb.aio_buf = buf;
       aiocb.aio_nbytes = sizeof(buf);

       aio_read(&aiocb);
       perror("aio_read");

       while (aio_error(&aiocb) == EINPROGRESS);
       printf("buf = %s\n", buf);
}

Tracing the aio_read() through the UML kernel finally gets me here:

#0  sys_pread64 (fd=3, buf=0xbf7c8f20 "", count=1024, pos=0)
   at fs/read_write.c:354
#1  0x08062ff8 in execute_syscall_skas (r=0x12374864)
   at arch/um/kernel/skas/syscall_kern.c:29
#2  0x0806302f in handle_syscall (regs=0x12374864)
   at arch/um/kernel/skas/syscall_user.c:25
#3  0x08062651 in userspace (regs=0x12374864)
   at arch/um/kernel/skas/process.c:91
#4  0x08062d44 in fork_handler (sig=10) at thread_info.h:47
#5  <signal handler called>
#6  0xffffe410 in __kernel_vsyscall ()
#7  0x00000000 in ?? ()
(gdb)


[-- Attachment #2: allan.graves.vcf --]
[-- Type: text/x-vcard, Size: 147 bytes --]

begin:vcard
fn:Allan Graves
n:Graves;Allan
email;internet:allan.graves@oracle.com
tel;work:603-8973276
x-mozilla-html:FALSE
version:2.1
end:vcard


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-07-13 17:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-12 20:57 [uml-devel] Clarification of UML and AIO? Allan Graves
2005-07-12 22:03 ` Jeff Dike
2005-07-13 13:39   ` Blaisorblade
2005-07-13 17:57   ` Allan Graves

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.