[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-bugs] [Bug 743] Unable to start more than a few domU's on RHEL4 amd64 (Error: Backend device not found)



http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=743





------- Comment #18 from tejasvia@xxxxxxxxx  2006-08-29 10:29 -------
io_setup() during the failure is returning -11  (EAGAIN -
include/asm-generic/errno-base.h), and tdaio_open()#tools/drivers/block-aio.c
is considering any non-zero return code to be non-existing support, and that is
why the aio-poll support error msg appears!

The man page for io_setup() indicates that EAGAIN is returned when "The
specified nr_events exceeds the user's limit of available events"

Digging into the kernel code (havent instrumented it, yet), it appears that 
ioctx_alloc is failing with EAGAIN (going by the reason mentioned on the
manpage for EAGAIN)

sys_io_setup(..) #fs/aio.c
{

        ioctx = ioctx_alloc(nr_events);
        ret = PTR_ERR(ioctx);
        if (!IS_ERR(ioctx)) {
                ret = put_user(ioctx->user_id, ctxp);
         ...

}

kioctx *ioctx_alloc(unsigned nr_events) #fs/aio.c
{
....
...
        if ((unsigned long)nr_events > aio_max_nr)
                return ERR_PTR(-EAGAIN);
...

}

&& 

unsigned long aio_max_nr = 0x10000; /* system wide maximum number of aio
requests */

unless it is changed elsewhere.

and in the user space tool, 

tdaio_open() #tools/blktap/drivers/block-aio.c
{
...

        prv->aio_ctx = (io_context_t) REQUEST_ASYNC_FD;
        prv->poll_fd = io_setup(MAX_AIO_REQS, &prv->aio_ctx);

        if (prv->poll_fd < 0) {
                ret = prv->poll_fd;
                DPRINTF("Couldn't get fd for AIO poll support.  This is "
                        "probably because your kernel does not have the "
                        "aio-poll patch applied.\n");
                goto done;
        }
...
...
}

#define MAX_AIO_REQS (MAX_REQUESTS * MAX_SEGMENTS_PER_REQ * 8)

== 64*11*8 = 5632 (0x1600)

and in my case REQUEST_AYSNC_FD == 1 (block-aio)


-- 
Configure bugmail: 
http://bugzilla.xensource.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

_______________________________________________
Xen-bugs mailing list
Xen-bugs@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-bugs


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.