Changeset 9282

Show
Ignore:
Timestamp:
04/18/12 09:22:25 (14 months ago)
Author:
sdsnyde
Message:

AIO waiting list bugs fixed. Async read/write interface fully functional, tested with up to 16 threads and 150 open files

Location:
branches/asyncio/src/client/usrint
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/asyncio/src/client/usrint/aiocommon.c

    r9281 r9282  
    123123          pthread_mutex_lock(&waiting_list_mutex); 
    124124          qlist_add_tail(&(list[i]->link), aio_waiting_list); 
     125          list[i]->a_cb->__error_code = EINPROGRESS; 
    125126          gossip_debug(GOSSIP_USRINT_DEBUG, "%d AIO requests now waiting\n",  
    126127                       qlist_count(aio_waiting_list)); 
     
    240241   struct qlist_head *next_io; 
    241242   struct pvfs_aiocb *io_cb; 
    242    PVFS_sys_op_id ret_op_ids[PVFS_AIO_MAX_PROGRESS_OPS]; 
     243   PVFS_sys_op_id ret_op_ids[PVFS_AIO_MAX_RUNNING]; 
    243244   PVFS_sys_op_id temp_running_ops[PVFS_AIO_MAX_RUNNING] = {0}; 
    244    int err_code_array[PVFS_AIO_MAX_PROGRESS_OPS] = {0}; 
    245    struct pvfs_aiocb *aiocb_array[PVFS_AIO_MAX_PROGRESS_OPS] = {NULL}; 
     245   int err_code_array[PVFS_AIO_MAX_RUNNING] = {0}; 
     246   struct pvfs_aiocb *aiocb_array[PVFS_AIO_MAX_RUNNING] = {NULL}; 
    246247 
    247248   gossip_debug(GOSSIP_USRINT_DEBUG, "AIO progress thread starting up\n"); 
     
    361362 
    362363         num_aiocbs_running--; 
    363          if (!num_aiocbs_running) 
     364         pthread_mutex_lock(&waiting_list_mutex); 
     365         if (!num_aiocbs_running && qlist_empty(aio_waiting_list)) 
    364366         { 
    365367            gossip_debug(GOSSIP_USRINT_DEBUG, "No running requests, progress thread exiting\n"); 
    366368            progress_running = PVFS_AIO_PROGRESS_IDLE; 
     369            pthread_mutex_unlock(&waiting_list_mutex); 
    367370            pthread_mutex_unlock(&progress_sync_mutex); 
    368371            pthread_exit(NULL); 
    369372         } 
     373         pthread_mutex_unlock(&waiting_list_mutex); 
    370374      } 
    371375      pthread_mutex_unlock(&progress_sync_mutex); 
  • branches/asyncio/src/client/usrint/aiocommon.h

    r9226 r9282  
    1818#include "gossip.h" 
    1919 
    20 #define PVFS_AIO_MAX_RUNNING 5 
     20#define PVFS_AIO_MAX_RUNNING 10 
    2121#define PVFS_AIO_LISTIO_MAX 10 
    22 #define PVFS_AIO_MAX_PROGRESS_OPS 10 
    2322 
    2423#define PVFS_AIO_PROGRESS_IDLE 0