[prev in list] [next in list] [prev in thread] [next in thread] 

List:       glibc-help
Subject:    aio : implementation for requesting free elements
From:       paul.chavent () fnac ! net (paul ! chavent () fnac ! net)
Date:       2008-04-30 11:49:00
Message-ID: 8CA78C7D33B9BBA-86C-A2B () FRR1-L18 ! sis ! aol ! com
[Download RAW message or body]

Hi.

I evaluate the aio for a real-time application. I would like to avoid 
every allocation and thread creation at run-time.

So i read the implementation of aio in sysdeps/pthread/aio_misc.c

For allocating the requests there are two step :
- 1 - allocate a pool of 8 row of requests
- 2 - allocate an array of 32 or aio_num requests.

My question is why we only take care of the aio_num at the first row 
(line 137 in the 2.7 release)
8<--------------------------------------------------------
/* Allocate the new row. */
cnt = pool_size == 0 ? optim.aio_num : ENTRIES_PER_ROW;
new_row = (struct requestlist *) calloc (cnt, sizeof (struct 
requestlist));
8<--------------------------------------------------------

Moreover, the documentation says :
8<--------------------------------------------------------
aio_num
This number provides an estimate on the maximal number of 
simultaneously enqueued requests.
8<--------------------------------------------------------

But i can't find, in the implementation, any check that limits the 
number of requests according to aio_num...

Could you tell me if i misunderstood anything please ?

Thank you.

Paul.



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic