All of lore.kernel.org
 help / color / mirror / Atom feed
From: Allan Graves <allan.graves@oracle.com>
To: user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] Clarification of UML and AIO?
Date: Tue, 12 Jul 2005 16:57:57 -0400	[thread overview]
Message-ID: <42D42ED5.4000101@oracle.com> (raw)

[-- 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


             reply	other threads:[~2005-07-12 20:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-12 20:57 Allan Graves [this message]
2005-07-12 22:03 ` [uml-devel] Clarification of UML and AIO? Jeff Dike
2005-07-13 13:39   ` Blaisorblade
2005-07-13 17:57   ` Allan Graves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42D42ED5.4000101@oracle.com \
    --to=allan.graves@oracle.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.