Commit 10e3c644 authored by Xin Zhao's avatar Xin Zhao Committed by Pavan Balaji
Browse files

Add prefix "target_" to lock_entry related name and suffix "_head" to linked lists.


Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>
parent 7c39124f
......@@ -13,20 +13,23 @@
MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_lockqueue_alloc);
MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_winlock_getlocallock);
/* MPIDI_CH3I_Win_lock_entry_alloc(): return a new lock queue entry and
/* MPIDI_CH3I_Win_target_lock_entry_alloc(): return a new lock queue entry and
* initialize it. If we cannot get one, return NULL. */
#undef FUNCNAME
#define FUNCNAME MPIDI_CH3I_Win_lock_entry_alloc
#define FUNCNAME MPIDI_CH3I_Win_target_lock_entry_alloc
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static inline MPIDI_RMA_Lock_entry_t *MPIDI_CH3I_Win_lock_entry_alloc(MPID_Win * win_ptr,
MPIDI_CH3_Pkt_t * pkt)
static inline MPIDI_RMA_Target_lock_entry_t *MPIDI_CH3I_Win_target_lock_entry_alloc(MPID_Win *
win_ptr,
MPIDI_CH3_Pkt_t
* pkt)
{
MPIDI_RMA_Lock_entry_t *new_ptr = NULL;
MPIDI_RMA_Target_lock_entry_t *new_ptr = NULL;
if (win_ptr->lock_entry_pool != NULL) {
new_ptr = win_ptr->lock_entry_pool;
MPL_LL_DELETE(win_ptr->lock_entry_pool, win_ptr->lock_entry_pool_tail, new_ptr);
if (win_ptr->target_lock_entry_pool_head != NULL) {
new_ptr = win_ptr->target_lock_entry_pool_head;
MPL_LL_DELETE(win_ptr->target_lock_entry_pool_head, win_ptr->target_lock_entry_pool_tail,
new_ptr);
}
if (new_ptr != NULL) {
......@@ -41,25 +44,27 @@ static inline MPIDI_RMA_Lock_entry_t *MPIDI_CH3I_Win_lock_entry_alloc(MPID_Win *
return new_ptr;
}
/* MPIDI_CH3I_Win_lock_entry_free(): put a lock queue entry back to
/* MPIDI_CH3I_Win_target_lock_entry_free(): put a lock queue entry back to
* the global pool. */
#undef FUNCNAME
#define FUNCNAME MPIDI_CH3I_Win_lock_entry_free
#define FUNCNAME MPIDI_CH3I_Win_target_lock_entry_free
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static inline int MPIDI_CH3I_Win_lock_entry_free(MPID_Win * win_ptr,
MPIDI_RMA_Lock_entry_t * lock_entry)
static inline int MPIDI_CH3I_Win_target_lock_entry_free(MPID_Win * win_ptr,
MPIDI_RMA_Target_lock_entry_t *
target_lock_entry)
{
int mpi_errno = MPI_SUCCESS;
if (lock_entry->data != NULL) {
win_ptr->current_lock_data_bytes -= lock_entry->buf_size;
MPIU_Free(lock_entry->data);
if (target_lock_entry->data != NULL) {
win_ptr->current_target_lock_data_bytes -= target_lock_entry->buf_size;
MPIU_Free(target_lock_entry->data);
}
/* use PREPEND when return objects back to the pool
* in order to improve cache performance */
MPL_LL_PREPEND(win_ptr->lock_entry_pool, win_ptr->lock_entry_pool_tail, lock_entry);
MPL_LL_PREPEND(win_ptr->target_lock_entry_pool_head, win_ptr->target_lock_entry_pool_tail,
target_lock_entry);
return mpi_errno;
}
......
......@@ -16,8 +16,8 @@ int MPIDI_CH3I_RMA_Cleanup_target_aggressive(MPID_Win * win_ptr, MPIDI_RMA_Targe
int MPIDI_CH3I_RMA_Make_progress_target(MPID_Win * win_ptr, int target_rank, int *made_progress);
int MPIDI_CH3I_RMA_Make_progress_win(MPID_Win * win_ptr, int *made_progress);
extern MPIDI_RMA_Op_t *global_rma_op_pool, *global_rma_op_pool_tail, *global_rma_op_pool_start;
extern MPIDI_RMA_Target_t *global_rma_target_pool, *global_rma_target_pool_tail,
extern MPIDI_RMA_Op_t *global_rma_op_pool_head, *global_rma_op_pool_tail, *global_rma_op_pool_start;
extern MPIDI_RMA_Target_t *global_rma_target_pool_head, *global_rma_target_pool_tail,
*global_rma_target_pool_start;
MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_rmaqueue_alloc);
......@@ -52,18 +52,18 @@ static inline MPIDI_RMA_Op_t *MPIDI_CH3I_Win_op_alloc(MPID_Win * win_ptr)
{
MPIDI_RMA_Op_t *e;
if (win_ptr->op_pool == NULL) {
if (win_ptr->op_pool_head == NULL) {
/* local pool is empty, try to find something in the global pool */
if (global_rma_op_pool == NULL)
if (global_rma_op_pool_head == NULL)
return NULL;
else {
e = global_rma_op_pool;
MPL_LL_DELETE(global_rma_op_pool, global_rma_op_pool_tail, e);
e = global_rma_op_pool_head;
MPL_LL_DELETE(global_rma_op_pool_head, global_rma_op_pool_tail, e);
}
}
else {
e = win_ptr->op_pool;
MPL_LL_DELETE(win_ptr->op_pool, win_ptr->op_pool_tail, e);
e = win_ptr->op_pool_head;
MPL_LL_DELETE(win_ptr->op_pool_head, win_ptr->op_pool_tail, e);
}
e->dataloop = NULL;
......@@ -101,9 +101,9 @@ static inline int MPIDI_CH3I_Win_op_free(MPID_Win * win_ptr, MPIDI_RMA_Op_t * e)
/* use PREPEND when return objects back to the pool
* in order to improve cache performance */
if (e->pool_type == MPIDI_RMA_POOL_WIN)
MPL_LL_PREPEND(win_ptr->op_pool, win_ptr->op_pool_tail, e);
MPL_LL_PREPEND(win_ptr->op_pool_head, win_ptr->op_pool_tail, e);
else
MPL_LL_PREPEND(global_rma_op_pool, global_rma_op_pool_tail, e);
MPL_LL_PREPEND(global_rma_op_pool_head, global_rma_op_pool_tail, e);
return mpi_errno;
}
......@@ -118,18 +118,18 @@ static inline MPIDI_RMA_Target_t *MPIDI_CH3I_Win_target_alloc(MPID_Win * win_ptr
{
MPIDI_RMA_Target_t *e;
if (win_ptr->target_pool == NULL) {
if (win_ptr->target_pool_head == NULL) {
/* local pool is empty, try to find something in the global pool */
if (global_rma_target_pool == NULL)
if (global_rma_target_pool_head == NULL)
return NULL;
else {
e = global_rma_target_pool;
MPL_LL_DELETE(global_rma_target_pool, global_rma_target_pool_tail, e);
e = global_rma_target_pool_head;
MPL_LL_DELETE(global_rma_target_pool_head, global_rma_target_pool_tail, e);
}
}
else {
e = win_ptr->target_pool;
MPL_LL_DELETE(win_ptr->target_pool, win_ptr->target_pool_tail, e);
e = win_ptr->target_pool_head;
MPL_LL_DELETE(win_ptr->target_pool_head, win_ptr->target_pool_tail, e);
}
e->issued_read_op_list_head = e->issued_read_op_list_tail = NULL;
......@@ -173,9 +173,9 @@ static inline int MPIDI_CH3I_Win_target_free(MPID_Win * win_ptr, MPIDI_RMA_Targe
/* use PREPEND when return objects back to the pool
* in order to improve cache performance */
if (e->pool_type == MPIDI_RMA_POOL_WIN)
MPL_LL_PREPEND(win_ptr->target_pool, win_ptr->target_pool_tail, e);
MPL_LL_PREPEND(win_ptr->target_pool_head, win_ptr->target_pool_tail, e);
else
MPL_LL_PREPEND(global_rma_target_pool, global_rma_target_pool_tail, e);
MPL_LL_PREPEND(global_rma_target_pool_head, global_rma_target_pool_tail, e);
return mpi_errno;
}
......
......@@ -129,14 +129,14 @@ typedef struct MPIDI_RMA_Win_list {
extern MPIDI_RMA_Win_list_t *MPIDI_RMA_Win_list, *MPIDI_RMA_Win_list_tail;
typedef struct MPIDI_RMA_Lock_entry {
struct MPIDI_RMA_Lock_entry *next;
typedef struct MPIDI_RMA_Target_lock_entry {
struct MPIDI_RMA_Target_lock_entry *next;
MPIDI_CH3_Pkt_t pkt; /* all information for this request packet */
MPIDI_VC_t *vc;
void *data; /* for queued PUTs / ACCs / GACCs, data is copied here */
int buf_size;
int all_data_recved; /* indicate if all data has been received */
} MPIDI_RMA_Lock_entry_t;
} MPIDI_RMA_Target_lock_entry_t;
typedef MPIDI_RMA_Op_t *MPIDI_RMA_Ops_list_t;
......
......@@ -308,17 +308,17 @@ typedef struct MPIDI_Win_basic_info {
volatile int current_lock_type; /* current lock type on this window (as target) \
* (none, shared, exclusive) */ \
volatile int shared_lock_ref_cnt; \
struct MPIDI_RMA_Lock_entry volatile *lock_queue; /* list of unsatisfied locks */ \
struct MPIDI_RMA_Lock_entry volatile *lock_queue_tail; /* tail of unstaisfied locks. */ \
struct MPIDI_RMA_Target_lock_entry volatile *target_lock_queue_head; /* list of unsatisfied locks */ \
struct MPIDI_RMA_Target_lock_entry volatile *target_lock_queue_tail; /* tail of unstaisfied locks. */ \
\
struct MPIDI_Win_info_args info_args; \
int shm_allocated; /* flag: TRUE iff this window has a shared memory \
region associated with it */ \
struct MPIDI_RMA_Op *op_pool_start; /* start pointer used for freeing */\
struct MPIDI_RMA_Op *op_pool; /* pool of operations */ \
struct MPIDI_RMA_Op *op_pool_head; /* pool of operations */ \
struct MPIDI_RMA_Op *op_pool_tail; /* tail pointer to pool of operations. */ \
struct MPIDI_RMA_Target *target_pool_start; /* start pointer used for freeing */\
struct MPIDI_RMA_Target *target_pool; /* pool of targets */ \
struct MPIDI_RMA_Target *target_pool_head; /* pool of targets */ \
struct MPIDI_RMA_Target *target_pool_tail; /* tail pointer to pool of targets */\
struct MPIDI_RMA_Slot *slots; \
int num_slots; \
......@@ -339,10 +339,10 @@ typedef struct MPIDI_Win_basic_info {
int outstanding_locks; /* when issuing multiple lock requests in \
MPI_WIN_LOCK_ALL, this counter keeps track \
of number of locks not being granted yet. */ \
struct MPIDI_RMA_Lock_entry *lock_entry_pool_start; \
struct MPIDI_RMA_Lock_entry *lock_entry_pool; \
struct MPIDI_RMA_Lock_entry *lock_entry_pool_tail; \
int current_lock_data_bytes; \
struct MPIDI_RMA_Target_lock_entry *target_lock_entry_pool_start; \
struct MPIDI_RMA_Target_lock_entry *target_lock_entry_pool_head; \
struct MPIDI_RMA_Target_lock_entry *target_lock_entry_pool_tail; \
int current_target_lock_data_bytes; \
#ifdef MPIDI_CH3_WIN_DECL
#define MPID_DEV_WIN_DECL \
......@@ -433,7 +433,7 @@ typedef struct MPIDI_Request {
MPI_Win target_win_handle;
MPI_Win source_win_handle;
MPIDI_CH3_Pkt_flags_t flags; /* flags that were included in the original RMA packet header */
struct MPIDI_RMA_Lock_entry *lock_queue_entry;
struct MPIDI_RMA_Target_lock_entry *target_lock_queue_entry;
MPI_Request resp_request_handle; /* Handle for get_accumulate response */
void *ext_hdr_ptr; /* pointer to extended packet header */
......
......@@ -320,7 +320,7 @@ static inline int enqueue_lock_origin(MPID_Win * win_ptr, MPIDI_VC_t * vc,
MPIDI_CH3_Pkt_t * pkt,
MPIDI_msg_sz_t * buflen, MPID_Request ** reqp)
{
MPIDI_RMA_Lock_entry_t *new_ptr = NULL;
MPIDI_RMA_Target_lock_entry_t *new_ptr = NULL;
MPIDI_CH3_Pkt_flags_t flag;
MPI_Win source_win_handle;
MPI_Request request_handle;
......@@ -329,9 +329,9 @@ static inline int enqueue_lock_origin(MPID_Win * win_ptr, MPIDI_VC_t * vc,
(*reqp) = NULL;
new_ptr = MPIDI_CH3I_Win_lock_entry_alloc(win_ptr, pkt);
new_ptr = MPIDI_CH3I_Win_target_lock_entry_alloc(win_ptr, pkt);
if (new_ptr != NULL) {
MPL_LL_APPEND(win_ptr->lock_queue, win_ptr->lock_queue_tail, new_ptr);
MPL_LL_APPEND(win_ptr->target_lock_queue_head, win_ptr->target_lock_queue_tail, new_ptr);
new_ptr->vc = vc;
}
else {
......@@ -408,13 +408,14 @@ static inline int enqueue_lock_origin(MPID_Win * win_ptr, MPIDI_VC_t * vc,
}
if (new_ptr != NULL) {
if (win_ptr->current_lock_data_bytes + buf_size < MPIR_CVAR_CH3_RMA_LOCK_DATA_BYTES) {
if (win_ptr->current_target_lock_data_bytes + buf_size <
MPIR_CVAR_CH3_RMA_TARGET_LOCK_DATA_BYTES) {
new_ptr->data = MPIU_Malloc(buf_size);
}
if (new_ptr->data == NULL) {
/* Note that there are two possible reasons to make new_ptr->data to be NULL:
* (1) win_ptr->current_lock_data_bytes + buf_size >= MPIR_CVAR_CH3_RMA_LOCK_DATA_BYTES;
* (1) win_ptr->current_target_lock_data_bytes + buf_size >= MPIR_CVAR_CH3_RMA_TARGET_LOCK_DATA_BYTES;
* (2) MPIU_Malloc(buf_size) failed.
* In such cases, we cannot allocate memory for lock data, so we give up
* buffering lock data, however, we still buffer lock request.
......@@ -447,7 +448,7 @@ static inline int enqueue_lock_origin(MPID_Win * win_ptr, MPIDI_VC_t * vc,
data_discarded = 1;
}
else {
win_ptr->current_lock_data_bytes += buf_size;
win_ptr->current_target_lock_data_bytes += buf_size;
new_ptr->buf_size = buf_size;
}
}
......@@ -465,7 +466,7 @@ static inline int enqueue_lock_origin(MPID_Win * win_ptr, MPIDI_VC_t * vc,
req->dev.recv_data_sz = recv_data_sz;
req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_PiggybackLockOpRecvComplete;
req->dev.OnFinal = MPIDI_CH3_ReqHandler_PiggybackLockOpRecvComplete;
req->dev.lock_queue_entry = new_ptr;
req->dev.target_lock_queue_entry = new_ptr;
data_len = *buflen - sizeof(MPIDI_CH3_Pkt_t);
data_buf = (char *) pkt + sizeof(MPIDI_CH3_Pkt_t);
......@@ -478,7 +479,7 @@ static inline int enqueue_lock_origin(MPID_Win * win_ptr, MPIDI_VC_t * vc,
req->dev.recv_data_sz = recv_data_sz;
req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_PiggybackLockOpRecvComplete;
req->dev.OnFinal = MPIDI_CH3_ReqHandler_PiggybackLockOpRecvComplete;
req->dev.lock_queue_entry = new_ptr;
req->dev.target_lock_queue_entry = new_ptr;
data_len = *buflen - sizeof(MPIDI_CH3_Pkt_t);
data_buf = (char *) pkt + sizeof(MPIDI_CH3_Pkt_t);
......@@ -746,7 +747,7 @@ static inline int acquire_local_lock(MPID_Win * win_ptr, int lock_type)
/* Queue the lock information. */
MPIDI_CH3_Pkt_t pkt;
MPIDI_CH3_Pkt_lock_t *lock_pkt = &pkt.lock;
MPIDI_RMA_Lock_entry_t *new_ptr = NULL;
MPIDI_RMA_Target_lock_entry_t *new_ptr = NULL;
MPIDI_VC_t *my_vc;
MPIDI_Pkt_init(lock_pkt, MPIDI_CH3_PKT_LOCK);
......@@ -758,7 +759,7 @@ static inline int acquire_local_lock(MPID_Win * win_ptr, int lock_type)
lock_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE;
}
new_ptr = MPIDI_CH3I_Win_lock_entry_alloc(win_ptr, &pkt);
new_ptr = MPIDI_CH3I_Win_target_lock_entry_alloc(win_ptr, &pkt);
if (new_ptr == NULL) {
mpi_errno = handle_lock_ack(win_ptr, win_ptr->comm_ptr->rank,
MPIDI_CH3_PKT_FLAG_RMA_LOCK_DISCARDED);
......@@ -766,7 +767,7 @@ static inline int acquire_local_lock(MPID_Win * win_ptr, int lock_type)
MPIU_ERR_POP(mpi_errno);
goto fn_exit;
}
MPL_LL_APPEND(win_ptr->lock_queue, win_ptr->lock_queue_tail, new_ptr);
MPL_LL_APPEND(win_ptr->target_lock_queue_head, win_ptr->target_lock_queue_tail, new_ptr);
MPIDI_Comm_get_vc_set_active(win_ptr->comm_ptr, win_ptr->comm_ptr->rank, &my_vc);
new_ptr->vc = my_vc;
......
This diff is collapsed.
......@@ -83,7 +83,7 @@ MPID_Request * MPID_Request_create(void)
request for RMA operations */
req->dev.target_win_handle = MPI_WIN_NULL;
req->dev.source_win_handle = MPI_WIN_NULL;
req->dev.lock_queue_entry = NULL;
req->dev.target_lock_queue_entry = NULL;
req->dev.dtype_info = NULL;
req->dev.dataloop = NULL;
req->dev.iov_offset = 0;
......
......@@ -23,7 +23,7 @@ cvars:
a linked list of target elements. The distribution of ranks among
slots follows a round-robin pattern. Requires a positive value.
- name : MPIR_CVAR_CH3_RMA_LOCK_DATA_BYTES
- name : MPIR_CVAR_CH3_RMA_TARGET_LOCK_DATA_BYTES
category : CH3
type : int
default : 655360
......@@ -309,8 +309,8 @@ static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model,
/* (*win_ptr)->basic_info_table[] is set by caller; */
(*win_ptr)->current_lock_type = MPID_LOCK_NONE;
(*win_ptr)->shared_lock_ref_cnt = 0;
(*win_ptr)->lock_queue = NULL;
(*win_ptr)->lock_queue_tail = NULL;
(*win_ptr)->target_lock_queue_head = NULL;
(*win_ptr)->target_lock_queue_tail = NULL;
(*win_ptr)->shm_allocated = FALSE;
(*win_ptr)->states.access_state = MPIDI_RMA_NONE;
(*win_ptr)->states.exposure_state = MPIDI_RMA_NONE;
......@@ -323,7 +323,7 @@ static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model,
(*win_ptr)->lock_all_assert = 0;
(*win_ptr)->lock_epoch_count = 0;
(*win_ptr)->outstanding_locks = 0;
(*win_ptr)->current_lock_data_bytes = 0;
(*win_ptr)->current_target_lock_data_bytes = 0;
/* Initialize the info flags */
(*win_ptr)->info_args.no_locks = 0;
......@@ -345,11 +345,11 @@ static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model,
MPIU_CHKPMEM_MALLOC((*win_ptr)->op_pool_start, MPIDI_RMA_Op_t *,
sizeof(MPIDI_RMA_Op_t) * MPIR_CVAR_CH3_RMA_OP_WIN_POOL_SIZE, mpi_errno,
"RMA op pool");
(*win_ptr)->op_pool = NULL;
(*win_ptr)->op_pool_head = NULL;
(*win_ptr)->op_pool_tail = NULL;
for (i = 0; i < MPIR_CVAR_CH3_RMA_OP_WIN_POOL_SIZE; i++) {
(*win_ptr)->op_pool_start[i].pool_type = MPIDI_RMA_POOL_WIN;
MPL_LL_APPEND((*win_ptr)->op_pool, (*win_ptr)->op_pool_tail,
MPL_LL_APPEND((*win_ptr)->op_pool_head, (*win_ptr)->op_pool_tail,
&((*win_ptr)->op_pool_start[i]));
}
......@@ -358,11 +358,11 @@ static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model,
MPIU_CHKPMEM_MALLOC((*win_ptr)->target_pool_start, MPIDI_RMA_Target_t *,
sizeof(MPIDI_RMA_Target_t) * win_target_pool_size, mpi_errno,
"RMA target pool");
(*win_ptr)->target_pool = NULL;
(*win_ptr)->target_pool_head = NULL;
(*win_ptr)->target_pool_tail = NULL;
for (i = 0; i < win_target_pool_size; i++) {
(*win_ptr)->target_pool_start[i].pool_type = MPIDI_RMA_POOL_WIN;
MPL_LL_APPEND((*win_ptr)->target_pool, (*win_ptr)->target_pool_tail,
MPL_LL_APPEND((*win_ptr)->target_pool_head, (*win_ptr)->target_pool_tail,
&((*win_ptr)->target_pool_start[i]));
}
......@@ -375,15 +375,17 @@ static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model,
}
if (!(*win_ptr)->info_args.no_locks) {
MPIU_CHKPMEM_MALLOC((*win_ptr)->lock_entry_pool_start, MPIDI_RMA_Lock_entry_t *,
sizeof(MPIDI_RMA_Lock_entry_t) *
MPIR_CVAR_CH3_RMA_LOCK_ENTRY_WIN_POOL_SIZE, mpi_errno,
MPIU_CHKPMEM_MALLOC((*win_ptr)->target_lock_entry_pool_start,
MPIDI_RMA_Target_lock_entry_t *,
sizeof(MPIDI_RMA_Target_lock_entry_t) *
MPIR_CVAR_CH3_RMA_TARGET_LOCK_ENTRY_WIN_POOL_SIZE, mpi_errno,
"RMA lock entry pool");
(*win_ptr)->lock_entry_pool = NULL;
(*win_ptr)->lock_entry_pool_tail = NULL;
for (i = 0; i < MPIR_CVAR_CH3_RMA_LOCK_ENTRY_WIN_POOL_SIZE; i++) {
MPL_LL_APPEND((*win_ptr)->lock_entry_pool, (*win_ptr)->lock_entry_pool_tail,
&((*win_ptr)->lock_entry_pool_start[i]));
(*win_ptr)->target_lock_entry_pool_head = NULL;
(*win_ptr)->target_lock_entry_pool_tail = NULL;
for (i = 0; i < MPIR_CVAR_CH3_RMA_TARGET_LOCK_ENTRY_WIN_POOL_SIZE; i++) {
MPL_LL_APPEND((*win_ptr)->target_lock_entry_pool_head,
(*win_ptr)->target_lock_entry_pool_tail,
&((*win_ptr)->target_lock_entry_pool_start[i]));
}
}
......
......@@ -63,7 +63,7 @@ cvars:
targets) that stores information about RMA targets that
could not be issued immediatly. Requires a positive value.
- name : MPIR_CVAR_CH3_RMA_LOCK_ENTRY_WIN_POOL_SIZE
- name : MPIR_CVAR_CH3_RMA_TARGET_LOCK_ENTRY_WIN_POOL_SIZE
category : CH3
type : int
default : 256
......@@ -79,9 +79,9 @@ cvars:
*/
MPIDI_RMA_Op_t *global_rma_op_pool = NULL, *global_rma_op_pool_tail =
MPIDI_RMA_Op_t *global_rma_op_pool_head = NULL, *global_rma_op_pool_tail =
NULL, *global_rma_op_pool_start = NULL;
MPIDI_RMA_Target_t *global_rma_target_pool = NULL, *global_rma_target_pool_tail =
MPIDI_RMA_Target_t *global_rma_target_pool_head = NULL, *global_rma_target_pool_tail =
NULL, *global_rma_target_pool_start = NULL;
#undef FUNCNAME
......@@ -103,7 +103,8 @@ int MPIDI_RMA_init(void)
mpi_errno, "RMA op pool");
for (i = 0; i < MPIR_CVAR_CH3_RMA_OP_GLOBAL_POOL_SIZE; i++) {
global_rma_op_pool_start[i].pool_type = MPIDI_RMA_POOL_GLOBAL;
MPL_LL_APPEND(global_rma_op_pool, global_rma_op_pool_tail, &(global_rma_op_pool_start[i]));
MPL_LL_APPEND(global_rma_op_pool_head, global_rma_op_pool_tail,
&(global_rma_op_pool_start[i]));
}
MPIU_CHKPMEM_MALLOC(global_rma_target_pool_start, MPIDI_RMA_Target_t *,
......@@ -111,7 +112,7 @@ int MPIDI_RMA_init(void)
mpi_errno, "RMA target pool");
for (i = 0; i < MPIR_CVAR_CH3_RMA_TARGET_GLOBAL_POOL_SIZE; i++) {
global_rma_target_pool_start[i].pool_type = MPIDI_RMA_POOL_GLOBAL;
MPL_LL_APPEND(global_rma_target_pool, global_rma_target_pool_tail,
MPL_LL_APPEND(global_rma_target_pool_head, global_rma_target_pool_tail,
&(global_rma_target_pool_start[i]));
}
......@@ -189,7 +190,8 @@ int MPIDI_Win_free(MPID_Win ** win_ptr)
* entering Win_free. */
while ((*win_ptr)->current_lock_type != MPID_LOCK_NONE ||
(*win_ptr)->at_completion_counter != 0 ||
(*win_ptr)->lock_queue != NULL || (*win_ptr)->current_lock_data_bytes != 0) {
(*win_ptr)->target_lock_queue_head != NULL ||
(*win_ptr)->current_target_lock_data_bytes != 0) {
mpi_errno = wait_progress_engine();
if (mpi_errno != MPI_SUCCESS)
MPIU_ERR_POP(mpi_errno);
......@@ -226,10 +228,10 @@ int MPIDI_Win_free(MPID_Win ** win_ptr)
MPIU_Free((*win_ptr)->op_pool_start);
MPIU_Free((*win_ptr)->target_pool_start);
MPIU_Free((*win_ptr)->slots);
if ((*win_ptr)->lock_entry_pool_start != NULL) {
MPIU_Free((*win_ptr)->lock_entry_pool_start);
if ((*win_ptr)->target_lock_entry_pool_start != NULL) {
MPIU_Free((*win_ptr)->target_lock_entry_pool_start);
}
MPIU_Assert((*win_ptr)->current_lock_data_bytes == 0);
MPIU_Assert((*win_ptr)->current_target_lock_data_bytes == 0);
/* Free the attached buffer for windows created with MPI_Win_allocate() */
if ((*win_ptr)->create_flavor == MPI_WIN_FLAVOR_ALLOCATE ||
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment