Cleaning up a bit
This commit was SVN r29240.
Этот коммит содержится в:
родитель
ac421fc1b9
Коммит
008a2af2d8
@ -31,7 +31,6 @@ int mca_atomic_mxm_cswap(void *target,
|
|||||||
{
|
{
|
||||||
unsigned my_pe;
|
unsigned my_pe;
|
||||||
uint8_t nlong_order;
|
uint8_t nlong_order;
|
||||||
//uint64_t remote_addr;
|
|
||||||
void *remote_addr;
|
void *remote_addr;
|
||||||
int ptl_id;
|
int ptl_id;
|
||||||
mxm_send_req_t sreq;
|
mxm_send_req_t sreq;
|
||||||
@ -78,7 +77,6 @@ int mca_atomic_mxm_cswap(void *target,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!mca_memheap.memheap_get_cached_mkey(pe,
|
if (!mca_memheap.memheap_get_cached_mkey(pe,
|
||||||
//(unsigned long) target,
|
|
||||||
target,
|
target,
|
||||||
ptl_id,
|
ptl_id,
|
||||||
&remote_addr)) {
|
&remote_addr)) {
|
||||||
|
@ -32,7 +32,6 @@ int mca_atomic_mxm_fadd(void *target,
|
|||||||
{
|
{
|
||||||
unsigned my_pe;
|
unsigned my_pe;
|
||||||
uint8_t nlong_order;
|
uint8_t nlong_order;
|
||||||
//uint64_t remote_addr;
|
|
||||||
void *remote_addr;
|
void *remote_addr;
|
||||||
int ptl_id;
|
int ptl_id;
|
||||||
mxm_send_req_t sreq;
|
mxm_send_req_t sreq;
|
||||||
@ -79,7 +78,6 @@ int mca_atomic_mxm_fadd(void *target,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!mca_memheap.memheap_get_cached_mkey(pe,
|
if (!mca_memheap.memheap_get_cached_mkey(pe,
|
||||||
//(unsigned long) target,
|
|
||||||
target,
|
target,
|
||||||
ptl_id,
|
ptl_id,
|
||||||
&remote_addr)) {
|
&remote_addr)) {
|
||||||
|
@ -543,7 +543,6 @@ mca_spml_mkey_t *mca_spml_ikrit_register(void* addr,
|
|||||||
mkeys[i].va_base = 0;
|
mkeys[i].va_base = 0;
|
||||||
} else {
|
} else {
|
||||||
mkeys[i].key = 0;
|
mkeys[i].key = 0;
|
||||||
//mkeys[i].va_base = (unsigned long) addr;
|
|
||||||
mkeys[i].va_base = addr;
|
mkeys[i].va_base = addr;
|
||||||
}
|
}
|
||||||
mkeys[i].spml_context = 0;
|
mkeys[i].spml_context = 0;
|
||||||
@ -551,7 +550,6 @@ mca_spml_mkey_t *mca_spml_ikrit_register(void* addr,
|
|||||||
case MXM_PTL_SELF:
|
case MXM_PTL_SELF:
|
||||||
mkeys[i].key = 0;
|
mkeys[i].key = 0;
|
||||||
mkeys[i].spml_context = 0;
|
mkeys[i].spml_context = 0;
|
||||||
//mkeys[i].va_base = (unsigned long) addr;
|
|
||||||
mkeys[i].va_base = addr;
|
mkeys[i].va_base = addr;
|
||||||
break;
|
break;
|
||||||
case MXM_PTL_RDMA:
|
case MXM_PTL_RDMA:
|
||||||
@ -561,7 +559,6 @@ mca_spml_mkey_t *mca_spml_ikrit_register(void* addr,
|
|||||||
mkeys[i].ib.lkey = mkeys[i].ib.rkey = 0;
|
mkeys[i].ib.lkey = mkeys[i].ib.rkey = 0;
|
||||||
#endif
|
#endif
|
||||||
mkeys[i].spml_context = 0;
|
mkeys[i].spml_context = 0;
|
||||||
//mkeys[i].va_base = (unsigned long) addr;
|
|
||||||
mkeys[i].va_base = addr;
|
mkeys[i].va_base = addr;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -654,7 +651,6 @@ static int mca_spml_ikrit_get_helper(mxm_send_req_t *sreq,
|
|||||||
{
|
{
|
||||||
/* shmem spec states that get() operations are blocking. So it is enough
|
/* shmem spec states that get() operations are blocking. So it is enough
|
||||||
to have single mxm request. Also we count on mxm doing copy */
|
to have single mxm request. Also we count on mxm doing copy */
|
||||||
//uint64_t rva;
|
|
||||||
void *rva;
|
void *rva;
|
||||||
mca_spml_mkey_t *r_mkey;
|
mca_spml_mkey_t *r_mkey;
|
||||||
int ptl_id;
|
int ptl_id;
|
||||||
@ -668,7 +664,6 @@ static int mca_spml_ikrit_get_helper(mxm_send_req_t *sreq,
|
|||||||
* Get the address to the remote rkey.
|
* Get the address to the remote rkey.
|
||||||
**/
|
**/
|
||||||
r_mkey = mca_memheap.memheap_get_cached_mkey(src,
|
r_mkey = mca_memheap.memheap_get_cached_mkey(src,
|
||||||
//(unsigned long) src_addr,
|
|
||||||
src_addr,
|
src_addr,
|
||||||
ptl_id,
|
ptl_id,
|
||||||
&rva);
|
&rva);
|
||||||
@ -711,7 +706,6 @@ static inline int mca_spml_ikrit_get_shm(void *src_addr,
|
|||||||
int src)
|
int src)
|
||||||
{
|
{
|
||||||
int ptl_id;
|
int ptl_id;
|
||||||
//uint64_t rva;
|
|
||||||
void *rva;
|
void *rva;
|
||||||
mca_spml_mkey_t *r_mkey;
|
mca_spml_mkey_t *r_mkey;
|
||||||
|
|
||||||
@ -723,7 +717,6 @@ static inline int mca_spml_ikrit_get_shm(void *src_addr,
|
|||||||
return OSHMEM_ERROR;
|
return OSHMEM_ERROR;
|
||||||
|
|
||||||
r_mkey = mca_memheap.memheap_get_cached_mkey(src,
|
r_mkey = mca_memheap.memheap_get_cached_mkey(src,
|
||||||
//(unsigned long) src_addr,
|
|
||||||
src_addr,
|
src_addr,
|
||||||
ptl_id,
|
ptl_id,
|
||||||
&rva);
|
&rva);
|
||||||
@ -734,7 +727,6 @@ static inline int mca_spml_ikrit_get_shm(void *src_addr,
|
|||||||
return OSHMEM_ERROR;
|
return OSHMEM_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (OPAL_UNLIKELY(!mca_memheap.memheap_is_symmetric_addr((unsigned long)src_addr) || (unsigned long)src_addr == rva))
|
|
||||||
if (OPAL_UNLIKELY(!mca_memheap.memheap_is_symmetric_addr(src_addr) || src_addr == rva))
|
if (OPAL_UNLIKELY(!mca_memheap.memheap_is_symmetric_addr(src_addr) || src_addr == rva))
|
||||||
return OSHMEM_ERROR;
|
return OSHMEM_ERROR;
|
||||||
|
|
||||||
@ -917,14 +909,12 @@ static inline void put_completion_cb(void *ctx)
|
|||||||
#if MXM_API < MXM_VERSION(2,0)
|
#if MXM_API < MXM_VERSION(2,0)
|
||||||
if (0 == peer->n_active_puts &&
|
if (0 == peer->n_active_puts &&
|
||||||
(put_req->mxm_req.base.flags & MXM_REQ_FLAG_SEND_SYNC)) {
|
(put_req->mxm_req.base.flags & MXM_REQ_FLAG_SEND_SYNC)) {
|
||||||
//SPML_VERBOSE(20, "removed pe %d from active list", put_req->pe);
|
|
||||||
opal_list_remove_item(&mca_spml_ikrit.active_peers, &peer->super);
|
opal_list_remove_item(&mca_spml_ikrit.active_peers, &peer->super);
|
||||||
peer->need_fence = 0;
|
peer->need_fence = 0;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (0 == peer->n_active_puts &&
|
if (0 == peer->n_active_puts &&
|
||||||
(put_req->mxm_req.opcode == MXM_REQ_OP_PUT_SYNC)) {
|
(put_req->mxm_req.opcode == MXM_REQ_OP_PUT_SYNC)) {
|
||||||
//SPML_VERBOSE(20, "removed pe %d from active list", put_req->pe);
|
|
||||||
opal_list_remove_item(&mca_spml_ikrit.active_peers, &peer->super);
|
opal_list_remove_item(&mca_spml_ikrit.active_peers, &peer->super);
|
||||||
peer->need_fence = 0;
|
peer->need_fence = 0;
|
||||||
}
|
}
|
||||||
@ -948,7 +938,6 @@ static inline int mca_spml_ikrit_put_internal(void* dst_addr,
|
|||||||
void **handle,
|
void **handle,
|
||||||
int zcopy)
|
int zcopy)
|
||||||
{
|
{
|
||||||
//uint64_t rva;
|
|
||||||
void *rva;
|
void *rva;
|
||||||
mca_spml_ikrit_put_request_t *put_req;
|
mca_spml_ikrit_put_request_t *put_req;
|
||||||
int ptl_id;
|
int ptl_id;
|
||||||
@ -963,7 +952,6 @@ static inline int mca_spml_ikrit_put_internal(void* dst_addr,
|
|||||||
ptl_id = get_ptl_id(dst);
|
ptl_id = get_ptl_id(dst);
|
||||||
/* Get rkey of remote PE (dst proc) which must be on memheap */
|
/* Get rkey of remote PE (dst proc) which must be on memheap */
|
||||||
r_mkey = mca_memheap.memheap_get_cached_mkey(dst,
|
r_mkey = mca_memheap.memheap_get_cached_mkey(dst,
|
||||||
//(unsigned long) dst_addr,
|
|
||||||
dst_addr,
|
dst_addr,
|
||||||
ptl_id,
|
ptl_id,
|
||||||
&rva);
|
&rva);
|
||||||
@ -981,7 +969,6 @@ static inline int mca_spml_ikrit_put_internal(void* dst_addr,
|
|||||||
#endif
|
#endif
|
||||||
if (ptl_id == MXM_PTL_SHM) {
|
if (ptl_id == MXM_PTL_SHM) {
|
||||||
|
|
||||||
//if (OPAL_LIKELY(mca_memheap.memheap_is_symmetric_addr((unsigned long)dst_addr) && (unsigned long)dst_addr != rva)) {
|
|
||||||
if (OPAL_LIKELY(mca_memheap.memheap_is_symmetric_addr(dst_addr) && dst_addr != rva)) {
|
if (OPAL_LIKELY(mca_memheap.memheap_is_symmetric_addr(dst_addr) && dst_addr != rva)) {
|
||||||
memcpy((void *) (unsigned long) rva, src_addr, size);
|
memcpy((void *) (unsigned long) rva, src_addr, size);
|
||||||
/* call progress as often as we would have with regular put */
|
/* call progress as often as we would have with regular put */
|
||||||
@ -992,7 +979,6 @@ static inline int mca_spml_ikrit_put_internal(void* dst_addr,
|
|||||||
/* segment not mapped - fallback to rmda */
|
/* segment not mapped - fallback to rmda */
|
||||||
ptl_id = MXM_PTL_RDMA;
|
ptl_id = MXM_PTL_RDMA;
|
||||||
r_mkey = mca_memheap.memheap_get_cached_mkey(dst,
|
r_mkey = mca_memheap.memheap_get_cached_mkey(dst,
|
||||||
//(unsigned long) dst_addr,
|
|
||||||
dst_addr,
|
dst_addr,
|
||||||
ptl_id,
|
ptl_id,
|
||||||
&rva);
|
&rva);
|
||||||
@ -1064,7 +1050,6 @@ static inline int mca_spml_ikrit_put_internal(void* dst_addr,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (mca_spml_ikrit.mxm_peers[dst]->pe_relay >= 0
|
if (mca_spml_ikrit.mxm_peers[dst]->pe_relay >= 0
|
||||||
//&& mca_memheap_base_detect_addr_type((unsigned long) dst_addr)
|
|
||||||
&& mca_memheap_base_detect_addr_type(dst_addr)
|
&& mca_memheap_base_detect_addr_type(dst_addr)
|
||||||
== ADDR_USER) {
|
== ADDR_USER) {
|
||||||
put_req->mxm_req.op.am.hid = 0;
|
put_req->mxm_req.op.am.hid = 0;
|
||||||
@ -1130,7 +1115,6 @@ int mca_spml_ikrit_put_simple(void* dst_addr,
|
|||||||
void* src_addr,
|
void* src_addr,
|
||||||
int dst)
|
int dst)
|
||||||
{
|
{
|
||||||
//uint64_t rva;
|
|
||||||
void *rva;
|
void *rva;
|
||||||
mxm_send_req_t mxm_req;
|
mxm_send_req_t mxm_req;
|
||||||
mxm_wait_t wait;
|
mxm_wait_t wait;
|
||||||
@ -1158,7 +1142,6 @@ int mca_spml_ikrit_put_simple(void* dst_addr,
|
|||||||
#endif
|
#endif
|
||||||
if (ptl_id == MXM_PTL_SHM) {
|
if (ptl_id == MXM_PTL_SHM) {
|
||||||
|
|
||||||
//if (OPAL_LIKELY(mca_memheap.memheap_is_symmetric_addr((unsigned long)dst_addr) && (unsigned long)dst_addr != rva)) {
|
|
||||||
if (OPAL_LIKELY(mca_memheap.memheap_is_symmetric_addr(dst_addr) && dst_addr != rva)) {
|
if (OPAL_LIKELY(mca_memheap.memheap_is_symmetric_addr(dst_addr) && dst_addr != rva)) {
|
||||||
memcpy((void *) (unsigned long) rva, src_addr, size);
|
memcpy((void *) (unsigned long) rva, src_addr, size);
|
||||||
/* call progress as often as we would have with regular put */
|
/* call progress as often as we would have with regular put */
|
||||||
@ -1290,7 +1273,6 @@ static void mxm_relay_handler(mxm_conn_h conn,
|
|||||||
size_t offset,
|
size_t offset,
|
||||||
int is_lf)
|
int is_lf)
|
||||||
{
|
{
|
||||||
//uint64_t va, rva;
|
|
||||||
void *va, *rva;
|
void *va, *rva;
|
||||||
char *pkt_data;
|
char *pkt_data;
|
||||||
mca_spml_mkey_t *r_mkey;
|
mca_spml_mkey_t *r_mkey;
|
||||||
@ -1298,21 +1280,18 @@ static void mxm_relay_handler(mxm_conn_h conn,
|
|||||||
mxm_peer_t *peer;
|
mxm_peer_t *peer;
|
||||||
|
|
||||||
if (offset == 0) {
|
if (offset == 0) {
|
||||||
//va = *(uint64_t *) data;
|
|
||||||
va = data;
|
va = data;
|
||||||
pkt_data = (char *) data + sizeof(va);
|
pkt_data = (char *) data + sizeof(va);
|
||||||
len -= sizeof(va);
|
len -= sizeof(va);
|
||||||
if (!is_lf) {
|
if (!is_lf) {
|
||||||
/* we expect more fragments: save destination virtual address */
|
/* we expect more fragments: save destination virtual address */
|
||||||
peer = mxm_conn_ctx_get(conn);
|
peer = mxm_conn_ctx_get(conn);
|
||||||
//peer->dst_va = va;
|
|
||||||
peer->dst_va = (uintptr_t) va;
|
peer->dst_va = (uintptr_t) va;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* next fragment: use saved va and offset to compute va */
|
/* next fragment: use saved va and offset to compute va */
|
||||||
pkt_data = data;
|
pkt_data = data;
|
||||||
peer = mxm_conn_ctx_get(conn);
|
peer = mxm_conn_ctx_get(conn);
|
||||||
//va = peer->dst_va + offset - sizeof(va);
|
|
||||||
va = (void *)(peer->dst_va + offset - sizeof(va));
|
va = (void *)(peer->dst_va + offset - sizeof(va));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user