Commit 8a172d8b authored by Xin Zhao's avatar Xin Zhao Committed by Pavan Balaji
Browse files

Add "issued_" prefix to read_op_list, write_op_list and dt_op_list.



"read_op_list", "write_op_list" and "dt_op_list" are used to store
RMA operations that are issued but not completed. Here we add
prefix to make it clearer.
Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>
parent 2db95ef9
......@@ -111,9 +111,9 @@ static inline MPIDI_RMA_Target_t *MPIDI_CH3I_Win_target_alloc(MPID_Win * win_ptr
MPL_LL_DELETE(win_ptr->target_pool, win_ptr->target_pool_tail, e);
}
e->read_op_list_head = e->read_op_list_tail = NULL;
e->write_op_list_head = e->write_op_list_tail = NULL;
e->dt_op_list_head = e->dt_op_list_tail = NULL;
e->issued_read_op_list_head = e->issued_read_op_list_tail = NULL;
e->issued_write_op_list_head = e->issued_write_op_list_tail = NULL;
e->issued_dt_op_list_head = e->issued_dt_op_list_tail = NULL;
e->pending_op_list_head = e->pending_op_list_tail = NULL;
e->next_op_to_issue = NULL;
......@@ -145,9 +145,9 @@ static inline int MPIDI_CH3I_Win_target_free(MPID_Win * win_ptr, MPIDI_RMA_Targe
/* We enqueue elements to the right pool, so when they get freed
* at window free time, they won't conflict with the global pool
* or other windows */
MPIU_Assert(e->read_op_list_head == NULL);
MPIU_Assert(e->write_op_list_head == NULL);
MPIU_Assert(e->dt_op_list_head == NULL);
MPIU_Assert(e->issued_read_op_list_head == NULL);
MPIU_Assert(e->issued_write_op_list_head == NULL);
MPIU_Assert(e->issued_dt_op_list_head == NULL);
MPIU_Assert(e->pending_op_list_head == NULL);
/* use PREPEND when return objects back to the pool
......@@ -354,23 +354,23 @@ static inline int MPIDI_CH3I_RMA_Cleanup_ops_target(MPID_Win * win_ptr, MPIDI_RM
goto fn_exit;
if (target->pending_op_list_head == NULL &&
target->read_op_list_head == NULL && target->write_op_list_head == NULL &&
target->dt_op_list_head == NULL)
target->issued_read_op_list_head == NULL && target->issued_write_op_list_head == NULL &&
target->issued_dt_op_list_head == NULL)
goto cleanup_target;
if (target->read_op_list_head != NULL) {
op_list_head = &(target->read_op_list_head);
op_list_tail = &(target->read_op_list_tail);
if (target->issued_read_op_list_head != NULL) {
op_list_head = &(target->issued_read_op_list_head);
op_list_tail = &(target->issued_read_op_list_tail);
read_flag = 1;
}
else if (target->write_op_list_head != NULL) {
op_list_head = &(target->write_op_list_head);
op_list_tail = &(target->write_op_list_tail);
else if (target->issued_write_op_list_head != NULL) {
op_list_head = &(target->issued_write_op_list_head);
op_list_tail = &(target->issued_write_op_list_tail);
write_flag = 1;
}
else if (target->dt_op_list_head != NULL) {
op_list_head = &(target->dt_op_list_head);
op_list_tail = &(target->dt_op_list_tail);
else if (target->issued_dt_op_list_head != NULL) {
op_list_head = &(target->issued_dt_op_list_head);
op_list_tail = &(target->issued_dt_op_list_tail);
}
else {
/* only pending op list is not NULL, nothing we can do here. */
......@@ -421,23 +421,23 @@ static inline int MPIDI_CH3I_RMA_Cleanup_ops_target(MPID_Win * win_ptr, MPIDI_RM
if (*op_list_head == NULL) {
if (read_flag == 1) {
read_flag = 0;
if (target->write_op_list_head != NULL) {
op_list_head = &(target->write_op_list_head);
op_list_tail = &(target->write_op_list_tail);
if (target->issued_write_op_list_head != NULL) {
op_list_head = &(target->issued_write_op_list_head);
op_list_tail = &(target->issued_write_op_list_tail);
write_flag = 1;
}
else if (target->dt_op_list_head != NULL) {
op_list_head = &(target->dt_op_list_head);
op_list_tail = &(target->dt_op_list_tail);
else if (target->issued_dt_op_list_head != NULL) {
op_list_head = &(target->issued_dt_op_list_head);
op_list_tail = &(target->issued_dt_op_list_tail);
}
else
break;
}
else if (write_flag == 1) {
write_flag = 0;
if (target->dt_op_list_head != NULL) {
op_list_head = &(target->dt_op_list_head);
op_list_tail = &(target->dt_op_list_tail);
if (target->issued_dt_op_list_head != NULL) {
op_list_head = &(target->issued_dt_op_list_head);
op_list_tail = &(target->issued_dt_op_list_tail);
}
else
break;
......@@ -452,8 +452,8 @@ static inline int MPIDI_CH3I_RMA_Cleanup_ops_target(MPID_Win * win_ptr, MPIDI_RM
cleanup_target:
if (target->pending_op_list_head == NULL &&
target->read_op_list_head == NULL && target->write_op_list_head == NULL &&
target->dt_op_list_head == NULL) {
target->issued_read_op_list_head == NULL && target->issued_write_op_list_head == NULL &&
target->issued_dt_op_list_head == NULL) {
(*local_completed) = 1;
......
......@@ -79,9 +79,9 @@ typedef struct MPIDI_RMA_Op {
} MPIDI_RMA_Op_t;
typedef struct MPIDI_RMA_Target {
struct MPIDI_RMA_Op *read_op_list_head, *read_op_list_tail;
struct MPIDI_RMA_Op *write_op_list_head, *write_op_list_tail;
struct MPIDI_RMA_Op *dt_op_list_head, *dt_op_list_tail;
struct MPIDI_RMA_Op *issued_read_op_list_head, *issued_read_op_list_tail;
struct MPIDI_RMA_Op *issued_write_op_list_head, *issued_write_op_list_tail;
struct MPIDI_RMA_Op *issued_dt_op_list_head, *issued_dt_op_list_tail;
struct MPIDI_RMA_Op *pending_op_list_head, *pending_op_list_tail;
struct MPIDI_RMA_Op *next_op_to_issue;
struct MPIDI_RMA_Target *next;
......
......@@ -658,19 +658,19 @@ static inline int adjust_op_piggybacked_with_lock(MPID_Win * win_ptr,
}
if (is_derived) {
MPIDI_CH3I_RMA_Ops_append(&(target->dt_op_list_head),
&(target->dt_op_list_tail), op);
MPIDI_CH3I_RMA_Ops_append(&(target->issued_dt_op_list_head),
&(target->issued_dt_op_list_tail), op);
}
else if (op->pkt.type == MPIDI_CH3_PKT_PUT ||
op->pkt.type == MPIDI_CH3_PKT_PUT_IMMED ||
op->pkt.type == MPIDI_CH3_PKT_ACCUMULATE ||
op->pkt.type == MPIDI_CH3_PKT_ACCUMULATE_IMMED) {
MPIDI_CH3I_RMA_Ops_append(&(target->write_op_list_head),
&(target->write_op_list_tail), op);
MPIDI_CH3I_RMA_Ops_append(&(target->issued_write_op_list_head),
&(target->issued_write_op_list_tail), op);
}
else {
MPIDI_CH3I_RMA_Ops_append(&(target->read_op_list_head),
&(target->read_op_list_tail), op);
MPIDI_CH3I_RMA_Ops_append(&(target->issued_read_op_list_head),
&(target->issued_read_op_list_tail), op);
}
}
}
......
......@@ -429,19 +429,19 @@ static inline int issue_ops_target(MPID_Win * win_ptr, MPIDI_RMA_Target_t * targ
}
if (is_derived) {
MPIDI_CH3I_RMA_Ops_append(&(target->dt_op_list_head),
&(target->dt_op_list_tail), curr_op);
MPIDI_CH3I_RMA_Ops_append(&(target->issued_dt_op_list_head),
&(target->issued_dt_op_list_tail), curr_op);
}
else if (curr_op->pkt.type == MPIDI_CH3_PKT_PUT ||
curr_op->pkt.type == MPIDI_CH3_PKT_PUT_IMMED ||
curr_op->pkt.type == MPIDI_CH3_PKT_ACCUMULATE ||
curr_op->pkt.type == MPIDI_CH3_PKT_ACCUMULATE_IMMED) {
MPIDI_CH3I_RMA_Ops_append(&(target->write_op_list_head),
&(target->write_op_list_tail), curr_op);
MPIDI_CH3I_RMA_Ops_append(&(target->issued_write_op_list_head),
&(target->issued_write_op_list_tail), curr_op);
}
else {
MPIDI_CH3I_RMA_Ops_append(&(target->read_op_list_head),
&(target->read_op_list_tail), curr_op);
MPIDI_CH3I_RMA_Ops_append(&(target->issued_read_op_list_head),
&(target->issued_read_op_list_tail), curr_op);
}
}
......@@ -549,8 +549,8 @@ int MPIDI_CH3I_RMA_Free_ops_before_completion(MPID_Win * win_ptr)
if (win_ptr->slots[i].target_list_head != NULL) {
curr_target = win_ptr->slots[i].target_list_head;
while (curr_target != NULL) {
if (curr_target->read_op_list_head != NULL ||
curr_target->write_op_list_head != NULL) {
if (curr_target->issued_read_op_list_head != NULL ||
curr_target->issued_write_op_list_head != NULL) {
if (win_ptr->states.access_state == MPIDI_RMA_PER_TARGET ||
win_ptr->states.access_state == MPIDI_RMA_LOCK_ALL_CALLED) {
if (curr_target->access_state == MPIDI_RMA_LOCK_GRANTED)
......@@ -574,14 +574,14 @@ int MPIDI_CH3I_RMA_Free_ops_before_completion(MPID_Win * win_ptr)
* must do a Win_flush instead. */
curr_target->disable_flush_local = 1;
if (curr_target->read_op_list_head != NULL) {
op_list_head = &curr_target->read_op_list_head;
op_list_tail = &curr_target->read_op_list_tail;
if (curr_target->issued_read_op_list_head != NULL) {
op_list_head = &curr_target->issued_read_op_list_head;
op_list_tail = &curr_target->issued_read_op_list_tail;
read_flag = 1;
}
else {
op_list_head = &curr_target->write_op_list_head;
op_list_tail = &curr_target->write_op_list_tail;
op_list_head = &curr_target->issued_write_op_list_head;
op_list_tail = &curr_target->issued_write_op_list_tail;
}
/* free all ops in the list since we do not need to maintain them anymore */
......@@ -606,8 +606,8 @@ int MPIDI_CH3I_RMA_Free_ops_before_completion(MPID_Win * win_ptr)
if (*op_list_head == NULL) {
if (read_flag == 1) {
op_list_head = &curr_target->write_op_list_head;
op_list_head = &curr_target->write_op_list_tail;
op_list_head = &curr_target->issued_write_op_list_head;
op_list_head = &curr_target->issued_write_op_list_tail;
read_flag = 0;
}
}
......
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