Remove redundant (and possibly erroneous) alignment code in rcache. It is already handled by users of the rcache.
This was per RFC http://www.open-mpi.org/community/lists/devel/2013/09/12927.php and discussed in developers meeting. This commit was SVN r29233.
Этот коммит содержится в:
родитель
3b5e0736a3
Коммит
667c66941b
@ -16,6 +16,7 @@
|
||||
* Copyright (c) 2010 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2011-2012 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2013 NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -233,7 +234,7 @@ int mca_mpool_grdma_register(mca_mpool_base_module_t *mpool, void *addr,
|
||||
* Persistent registration are always registered and placed in the cache */
|
||||
if(!(bypass_cache || persist)) {
|
||||
/* check to see if memory is registered */
|
||||
mpool->rcache->rcache_find(mpool->rcache, addr, size, reg);
|
||||
mpool->rcache->rcache_find(mpool->rcache, base, bound - base + 1, reg);
|
||||
if (*reg && !(flags & MCA_MPOOL_FLAGS_INVALID)) {
|
||||
if (0 == (*reg)->ref_count) {
|
||||
/* Leave pinned must be set for this to still be in the rcache. */
|
||||
@ -346,7 +347,7 @@ int mca_mpool_grdma_find(struct mca_mpool_base_module_t *mpool, void *addr,
|
||||
|
||||
OPAL_THREAD_LOCK(&mpool->rcache->lock);
|
||||
|
||||
rc = mpool->rcache->rcache_find(mpool->rcache, addr, size, reg);
|
||||
rc = mpool->rcache->rcache_find(mpool->rcache, base, bound - base + 1, reg);
|
||||
if(NULL != *reg &&
|
||||
(mca_mpool_grdma_component.leave_pinned ||
|
||||
((*reg)->flags & MCA_MPOOL_FLAGS_PERSIST) ||
|
||||
|
@ -12,6 +12,7 @@
|
||||
* Copyright (c) 2006 Voltaire. All rights reserved.
|
||||
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2013 NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -49,15 +50,13 @@ int mca_rcache_vma_find(struct mca_rcache_base_module_t* rcache,
|
||||
void* addr, size_t size, mca_mpool_base_registration_t **reg)
|
||||
{
|
||||
int rc;
|
||||
void* base_addr;
|
||||
void* bound_addr;
|
||||
unsigned char* bound_addr;
|
||||
|
||||
if(size == 0) {
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
|
||||
base_addr = down_align_addr(addr, mca_mpool_base_page_size_log);
|
||||
bound_addr = up_align_addr((void*) ((unsigned long) addr + size - 1), mca_mpool_base_page_size_log);
|
||||
bound_addr = addr + size - 1;
|
||||
|
||||
/* Check to ensure that the cache is valid */
|
||||
if (OPAL_UNLIKELY(opal_memory_changed() &&
|
||||
@ -66,8 +65,8 @@ int mca_rcache_vma_find(struct mca_rcache_base_module_t* rcache,
|
||||
return rc;
|
||||
}
|
||||
|
||||
*reg = mca_rcache_vma_tree_find((mca_rcache_vma_module_t*)rcache, (unsigned char*)base_addr,
|
||||
(unsigned char*)bound_addr);
|
||||
*reg = mca_rcache_vma_tree_find((mca_rcache_vma_module_t*)rcache, (unsigned char*)addr,
|
||||
bound_addr);
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
@ -77,14 +76,13 @@ int mca_rcache_vma_find_all(struct mca_rcache_base_module_t* rcache,
|
||||
int reg_cnt)
|
||||
{
|
||||
int rc;
|
||||
void *base_addr, *bound_addr;
|
||||
unsigned char *bound_addr;
|
||||
|
||||
if(size == 0) {
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
|
||||
base_addr = down_align_addr(addr, mca_mpool_base_page_size_log);
|
||||
bound_addr = up_align_addr((void*) ((unsigned long) addr + size - 1), mca_mpool_base_page_size_log);
|
||||
bound_addr = addr + size - 1;
|
||||
|
||||
/* Check to ensure that the cache is valid */
|
||||
if (OPAL_UNLIKELY(opal_memory_changed() &&
|
||||
@ -94,7 +92,7 @@ int mca_rcache_vma_find_all(struct mca_rcache_base_module_t* rcache,
|
||||
}
|
||||
|
||||
return mca_rcache_vma_tree_find_all((mca_rcache_vma_module_t*)rcache,
|
||||
(unsigned char*)base_addr, (unsigned char*)bound_addr, regs,
|
||||
(unsigned char*)addr, bound_addr, regs,
|
||||
reg_cnt);
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user