1
1

Add flags parameter to btl_alloc() and btl_prepare_src() functions. If BTL

knows at the time of allocation priority of a descriptor it may do some
optimizations.

This commit was SVN r16901.
Этот коммит содержится в:
Gleb Natapov 2007-12-09 14:08:01 +00:00
родитель 5313a2baa7
Коммит e2e211f23b
35 изменённых файлов: 220 добавлений и 131 удалений

Просмотреть файл

@ -259,8 +259,8 @@ typedef struct mca_bml_base_endpoint_t mca_bml_base_endpoint_t;
OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_bml_base_endpoint_t);
static inline void mca_bml_base_alloc(mca_bml_base_btl_t* bml_btl, mca_btl_base_descriptor_t** des, uint8_t order, size_t size) {
*des = bml_btl->btl_alloc(bml_btl->btl, bml_btl->btl_endpoint, order, size);
static inline void mca_bml_base_alloc(mca_bml_base_btl_t* bml_btl, mca_btl_base_descriptor_t** des, uint8_t order, size_t size, uint32_t flags) {
*des = bml_btl->btl_alloc(bml_btl->btl, bml_btl->btl_endpoint, order, size, flags);
}
static inline void mca_bml_base_free(mca_bml_base_btl_t* bml_btl, mca_btl_base_descriptor_t* des) {
@ -318,6 +318,7 @@ static inline void mca_bml_base_prepare_src(mca_bml_base_btl_t* bml_btl,
uint8_t order,
size_t reserve,
size_t *size,
uint32_t flags,
mca_btl_base_descriptor_t** des) {
*des = bml_btl->btl_prepare_src(
bml_btl->btl,
@ -326,7 +327,8 @@ static inline void mca_bml_base_prepare_src(mca_bml_base_btl_t* bml_btl,
conv,
order,
reserve,
size
size,
flags
);
if( OPAL_LIKELY((*des) != NULL) ) {
(*des)->des_context = (void*) bml_btl;
@ -339,6 +341,7 @@ static inline void mca_bml_base_prepare_dst(mca_bml_base_btl_t* bml_btl,
uint8_t order,
size_t reserve,
size_t *size,
uint32_t flags,
mca_btl_base_descriptor_t** des) {
*des = bml_btl->btl_prepare_dst(
bml_btl->btl,
@ -347,7 +350,8 @@ static inline void mca_bml_base_prepare_dst(mca_bml_base_btl_t* bml_btl,
conv,
order,
reserve,
size
size,
flags
);
if( OPAL_LIKELY((*des) != NULL) ) {
(*des)->des_context = (void*) bml_btl;

Просмотреть файл

@ -239,7 +239,7 @@ struct mca_btl_base_descriptor_t {
mca_btl_base_completion_fn_t des_cbfunc; /**< local callback function */
void* des_cbdata; /**< opaque callback data */
void* des_context; /**< more opaque callback data */
int32_t des_flags; /**< hints to BTL */
uint32_t des_flags; /**< hints to BTL */
/** order value, this is only
valid in the local completion callback
and may be used in subsequent calls to
@ -517,7 +517,8 @@ typedef mca_btl_base_descriptor_t* (*mca_btl_base_module_alloc_fn_t)(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size
size_t size,
uint32_t flags
);
/**
@ -571,7 +572,8 @@ typedef struct mca_btl_base_descriptor_t* (*mca_btl_base_module_prepare_fn_t)(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size
size_t* size,
uint32_t flags
);
/**

Просмотреть файл

@ -225,7 +225,8 @@ mca_btl_base_descriptor_t* mca_btl_elan_alloc(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* peer,
uint8_t order,
size_t size )
size_t size,
uint32_t flags)
{
mca_btl_elan_frag_t* frag;
int rc;
@ -282,7 +283,8 @@ mca_btl_base_descriptor_t* mca_btl_elan_prepare_src( struct mca_btl_base_module_
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size )
size_t* size,
uint32_t flags)
{
@ -374,7 +376,8 @@ mca_btl_base_descriptor_t* mca_btl_elan_prepare_dst( struct mca_btl_base_module_
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size )
size_t* size,
uint32_t flags)
{
mca_btl_elan_frag_t* frag;

Просмотреть файл

@ -293,7 +293,8 @@ extern mca_btl_base_descriptor_t* mca_btl_elan_alloc(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* peer,
uint8_t order,
size_t size);
size_t size,
uint32_t flags);
/**
@ -329,7 +330,8 @@ mca_btl_base_descriptor_t* mca_btl_elan_prepare_src(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size
size_t* size,
uint32_t flags
);
extern mca_btl_base_descriptor_t* mca_btl_elan_prepare_dst(
@ -339,7 +341,8 @@ extern mca_btl_base_descriptor_t* mca_btl_elan_prepare_dst(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size);
size_t* size,
uint32_t flags);
extern bufdesc_t * elan_ipeek(mca_btl_elan_module_t* elan_btl);

Просмотреть файл

@ -204,7 +204,8 @@ mca_btl_base_descriptor_t* mca_btl_gm_alloc(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size)
size_t size,
uint32_t flags)
{
mca_btl_gm_module_t* gm_btl = (mca_btl_gm_module_t*) btl;
mca_btl_gm_frag_t* frag;
@ -271,7 +272,8 @@ mca_btl_base_descriptor_t* mca_btl_gm_prepare_src(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size
size_t* size,
uint32_t flags
)
{
mca_btl_gm_frag_t *frag = NULL;
@ -390,7 +392,8 @@ mca_btl_base_descriptor_t* mca_btl_gm_prepare_dst(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size)
size_t* size,
uint32_t flags)
{
#if (OMPI_MCA_BTL_GM_HAVE_RDMA_GET || OMPI_MCA_BTL_GM_HAVE_RDMA_PUT)
mca_btl_gm_frag_t* frag;

Просмотреть файл

@ -294,7 +294,8 @@ extern mca_btl_base_descriptor_t* mca_btl_gm_alloc(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size);
size_t size,
uint32_t flags);
/**
@ -330,7 +331,8 @@ mca_btl_base_descriptor_t* mca_btl_gm_prepare_src(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size
size_t* size,
uint32_t flags
);
extern mca_btl_base_descriptor_t* mca_btl_gm_prepare_dst(
@ -340,7 +342,8 @@ extern mca_btl_base_descriptor_t* mca_btl_gm_prepare_dst(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size);
size_t* size,
uint32_t flags);
/**
* Fault Tolerance Event Notification Function

Просмотреть файл

@ -165,7 +165,8 @@ int mca_btl_mx_register( struct mca_btl_base_module_t* btl,
mca_btl_base_descriptor_t* mca_btl_mx_alloc( struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size )
size_t size,
uint32_t flags)
{
mca_btl_mx_module_t* mx_btl = (mca_btl_mx_module_t*) btl;
mca_btl_mx_frag_t* frag;
@ -216,7 +217,8 @@ mca_btl_mx_prepare_src( struct mca_btl_base_module_t* btl,
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size )
size_t* size,
uint32_t flags)
{
mca_btl_mx_frag_t* frag;
struct iovec iov;
@ -299,7 +301,8 @@ mca_btl_base_descriptor_t* mca_btl_mx_prepare_dst( struct mca_btl_base_module_t*
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size)
size_t* size,
uint32_t flags)
{
mca_btl_mx_module_t* mx_btl = (mca_btl_mx_module_t*)btl;
mca_btl_mx_frag_t* frag;

Просмотреть файл

@ -256,7 +256,8 @@ extern int mca_btl_mx_register(
mca_btl_base_descriptor_t* mca_btl_mx_alloc( struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size );
size_t size,
uint32_t flags);
/**
@ -290,7 +291,8 @@ mca_btl_mx_prepare_src( struct mca_btl_base_module_t* btl,
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size );
size_t* size,
uint32_t flags);
mca_btl_base_descriptor_t*
mca_btl_mx_prepare_dst( struct mca_btl_base_module_t* btl,
@ -299,7 +301,8 @@ mca_btl_mx_prepare_dst( struct mca_btl_base_module_t* btl,
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size );
size_t* size,
uint32_t flags);
/**
* Fault Tolerance Event Notification Function

Просмотреть файл

@ -220,7 +220,8 @@ int mca_btl_ud_register(struct mca_btl_base_module_t* btl,
mca_btl_base_descriptor_t* mca_btl_ud_alloc(struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size)
size_t size,
uint32_t flags)
{
mca_btl_ud_frag_t* frag = NULL;
int rc;
@ -297,7 +298,8 @@ mca_btl_base_descriptor_t* mca_btl_ud_prepare_src(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size)
size_t* size,
uint32_t flags)
{
mca_btl_ud_frag_t* frag = NULL;
struct iovec iov;

Просмотреть файл

@ -296,7 +296,8 @@ extern mca_btl_base_descriptor_t* mca_btl_ud_alloc(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size);
size_t size,
uint32_t flags);
/**
@ -325,7 +326,8 @@ mca_btl_base_descriptor_t* mca_btl_ud_prepare_src(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size);
size_t* size,
uint32_t flags);

Просмотреть файл

@ -556,7 +556,8 @@ mca_btl_base_descriptor_t* mca_btl_openib_alloc(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* ep,
uint8_t order,
size_t size)
size_t size,
uint32_t flags)
{
mca_btl_openib_module_t *obtl = (mca_btl_openib_module_t*)btl;
int qp = frag_size_to_order(obtl, size);
@ -707,8 +708,8 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_src(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size
)
size_t* size,
uint32_t flags)
{
mca_btl_openib_module_t *openib_btl;
mca_btl_openib_reg_t *openib_reg;
@ -779,7 +780,7 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_src(
frag = (mca_btl_openib_com_frag_t*)(reserve ?
ib_frag_alloc(openib_btl, max_data + reserve, order) :
mca_btl_openib_alloc(btl, endpoint, order, max_data));
mca_btl_openib_alloc(btl, endpoint, order, max_data, flags));
if(NULL == frag)
return NULL;
@ -815,7 +816,8 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_dst(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size)
size_t* size,
uint32_t flags)
{
mca_btl_openib_module_t *openib_btl;
mca_btl_openib_com_frag_t *frag;

Просмотреть файл

@ -480,7 +480,8 @@ extern mca_btl_base_descriptor_t* mca_btl_openib_alloc(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size);
size_t size,
uint32_t flags);
/**
@ -508,7 +509,8 @@ mca_btl_base_descriptor_t* mca_btl_openib_prepare_src(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size
size_t* size,
uint32_t flags
);
/**
@ -524,7 +526,8 @@ extern mca_btl_base_descriptor_t* mca_btl_openib_prepare_dst(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size);
size_t* size,
uint32_t flags);
extern void mca_btl_openib_frag_progress_pending_put_get(
struct mca_btl_base_endpoint_t*, const int);

Просмотреть файл

@ -243,7 +243,8 @@ mca_btl_base_descriptor_t*
mca_btl_portals_alloc(struct mca_btl_base_module_t* btl_base,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size)
size_t size,
uint32_t flags)
{
int rc;
mca_btl_portals_frag_t* frag;
@ -311,7 +312,8 @@ mca_btl_portals_prepare_src(struct mca_btl_base_module_t* btl_base,
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size)
size_t* size,
uint32_t flags)
{
mca_btl_portals_frag_t* frag;
size_t max_data = *size;
@ -433,7 +435,8 @@ mca_btl_portals_prepare_dst(struct mca_btl_base_module_t* btl_base,
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size)
size_t* size,
uint32_t flags)
{
mca_btl_portals_frag_t* frag;
ptl_md_t md;

Просмотреть файл

@ -174,7 +174,8 @@ mca_btl_base_descriptor_t*
mca_btl_portals_alloc(struct mca_btl_base_module_t* btl_base,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size);
size_t size,
uint32_t flags);
int mca_btl_portals_free(struct mca_btl_base_module_t* btl_base,
mca_btl_base_descriptor_t* des);
@ -186,7 +187,8 @@ mca_btl_portals_prepare_src(struct mca_btl_base_module_t* btl_base,
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size);
size_t* size,
uint32_t flags);
mca_btl_base_descriptor_t*
mca_btl_portals_prepare_dst(struct mca_btl_base_module_t* btl_base,
@ -195,7 +197,8 @@ mca_btl_portals_prepare_dst(struct mca_btl_base_module_t* btl_base,
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size);
size_t* size,
uint32_t flags);
int mca_btl_portals_send(struct mca_btl_base_module_t* btl_base,
struct mca_btl_base_endpoint_t* btl_peer,

Просмотреть файл

@ -186,7 +186,8 @@ mca_btl_base_descriptor_t* mca_btl_sctp_alloc(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size)
size_t size,
uint32_t flags)
{
mca_btl_sctp_frag_t* frag;
int rc;
@ -241,7 +242,8 @@ mca_btl_base_descriptor_t* mca_btl_sctp_prepare_src(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size)
size_t* size,
uint32_t flags)
{
mca_btl_sctp_frag_t* frag;
struct iovec iov;
@ -341,7 +343,8 @@ mca_btl_base_descriptor_t* mca_btl_sctp_prepare_dst(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size)
size_t* size,
uint32_t flags)
{
mca_btl_sctp_frag_t* frag;
ptrdiff_t lb;

Просмотреть файл

@ -294,7 +294,8 @@ extern mca_btl_base_descriptor_t* mca_btl_sctp_alloc(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size);
size_t size,
uint32_t flags);
/**
@ -330,7 +331,8 @@ mca_btl_base_descriptor_t* mca_btl_sctp_prepare_src(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size
size_t* size,
uint32_t flags
);
extern mca_btl_base_descriptor_t* mca_btl_sctp_prepare_dst(
@ -340,7 +342,8 @@ extern mca_btl_base_descriptor_t* mca_btl_sctp_prepare_dst(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size);
size_t* size,
uint32_t flags);
#if defined(c_plusplus) || defined(__cplusplus)

Просмотреть файл

@ -152,7 +152,8 @@ mca_btl_base_descriptor_t* mca_btl_self_alloc(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size )
size_t size,
uint32_t flags)
{
mca_btl_self_frag_t* frag;
int rc;
@ -211,7 +212,8 @@ struct mca_btl_base_descriptor_t* mca_btl_self_prepare_src(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size)
size_t* size,
uint32_t flags)
{
mca_btl_self_frag_t* frag;
struct iovec iov;
@ -279,7 +281,8 @@ struct mca_btl_base_descriptor_t* mca_btl_self_prepare_dst(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size)
size_t* size,
uint32_t flags)
{
mca_btl_self_frag_t* frag;
size_t max_data = *size;

Просмотреть файл

@ -165,7 +165,8 @@ mca_btl_base_descriptor_t* mca_btl_self_alloc(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size
size_t size,
uint32_t flags
);
/**
@ -192,7 +193,8 @@ struct mca_btl_base_descriptor_t* mca_btl_self_prepare_src(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size
size_t* size,
uint32_t flags
);
/**
@ -208,7 +210,8 @@ struct mca_btl_base_descriptor_t* mca_btl_self_prepare_dst(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size
size_t* size,
uint32_t flags
);
/**

Просмотреть файл

@ -721,7 +721,8 @@ extern mca_btl_base_descriptor_t* mca_btl_sm_alloc(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size)
size_t size,
uint32_t flags)
{
mca_btl_sm_frag_t* frag;
int rc;
@ -769,7 +770,8 @@ struct mca_btl_base_descriptor_t* mca_btl_sm_prepare_src(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size)
size_t* size,
uint32_t flags)
{
mca_btl_sm_frag_t* frag;
struct iovec iov;

Просмотреть файл

@ -280,7 +280,8 @@ extern mca_btl_base_descriptor_t* mca_btl_sm_alloc(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size
size_t size,
uint32_t flags
);
/**
@ -308,7 +309,8 @@ struct mca_btl_base_descriptor_t* mca_btl_sm_prepare_src(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size
size_t* size,
uint32_t flags
);

Просмотреть файл

@ -188,7 +188,8 @@ mca_btl_base_descriptor_t* mca_btl_tcp_alloc(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size)
size_t size,
uint32_t flags)
{
mca_btl_tcp_frag_t* frag;
int rc;
@ -243,7 +244,8 @@ mca_btl_base_descriptor_t* mca_btl_tcp_prepare_src(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size)
size_t* size,
uint32_t flags)
{
mca_btl_tcp_frag_t* frag;
struct iovec iov;
@ -338,7 +340,8 @@ mca_btl_base_descriptor_t* mca_btl_tcp_prepare_dst(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size)
size_t* size,
uint32_t flags)
{
mca_btl_tcp_frag_t* frag;
int rc;

Просмотреть файл

@ -296,7 +296,8 @@ extern mca_btl_base_descriptor_t* mca_btl_tcp_alloc(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size);
size_t size,
uint32_t flags);
/**
@ -332,7 +333,8 @@ mca_btl_base_descriptor_t* mca_btl_tcp_prepare_src(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size
size_t* size,
uint32_t flags
);
extern mca_btl_base_descriptor_t* mca_btl_tcp_prepare_dst(
@ -342,7 +344,8 @@ extern mca_btl_base_descriptor_t* mca_btl_tcp_prepare_dst(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size);
size_t* size,
uint32_t flags);
/**

Просмотреть файл

@ -167,7 +167,8 @@ mca_btl_base_descriptor_t* mca_btl_template_alloc(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size)
size_t size,
uint32_t flags)
{
mca_btl_template_module_t* template_btl = (mca_btl_template_module_t*) btl;
mca_btl_template_frag_t* frag;
@ -228,7 +229,8 @@ mca_btl_base_descriptor_t* mca_btl_template_prepare_src(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size
size_t* size,
uint32_t flags
)
{
mca_btl_template_frag_t* frag;
@ -317,7 +319,8 @@ mca_btl_base_descriptor_t* mca_btl_template_prepare_dst(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size)
size_t* size,
uint32_t flags)
{
mca_btl_template_frag_t* frag;
int rc;

Просмотреть файл

@ -260,7 +260,8 @@ extern mca_btl_base_descriptor_t* mca_btl_template_alloc(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size);
size_t size,
uint32_t flags);
/**
@ -296,7 +297,8 @@ mca_btl_base_descriptor_t* mca_btl_template_prepare_src(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size
size_t* size,
uint32_t flags
);
extern mca_btl_base_descriptor_t* mca_btl_template_prepare_dst(
@ -306,7 +308,8 @@ extern mca_btl_base_descriptor_t* mca_btl_template_prepare_dst(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size);
size_t* size,
uint32_t flags);
/**
* Fault Tolerance Event Notification Function

Просмотреть файл

@ -737,7 +737,8 @@ mca_btl_base_descriptor_t* mca_btl_udapl_alloc(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size)
size_t size,
uint32_t flags)
{
mca_btl_udapl_module_t* udapl_btl = (mca_btl_udapl_module_t*) btl;
mca_btl_udapl_frag_t* frag;
@ -823,7 +824,8 @@ mca_btl_base_descriptor_t* mca_btl_udapl_prepare_src(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size
size_t* size,
uint32_t flags
)
{
mca_btl_udapl_frag_t* frag = NULL;
@ -951,7 +953,8 @@ mca_btl_base_descriptor_t* mca_btl_udapl_prepare_dst(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size)
size_t* size,
uint32_t flags)
{
mca_btl_udapl_frag_t* frag;
int rc;

Просмотреть файл

@ -345,7 +345,8 @@ extern mca_btl_base_descriptor_t* mca_btl_udapl_alloc(
struct mca_btl_base_module_t* btl,
struct mca_btl_base_endpoint_t* endpoint,
uint8_t order,
size_t size);
size_t size,
uint32_t flags);
/**
@ -381,7 +382,8 @@ mca_btl_base_descriptor_t* mca_btl_udapl_prepare_src(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size
size_t* size,
uint32_t flags
);
extern mca_btl_base_descriptor_t* mca_btl_udapl_prepare_dst(
@ -391,7 +393,8 @@ extern mca_btl_base_descriptor_t* mca_btl_udapl_prepare_dst(
struct ompi_convertor_t* convertor,
uint8_t order,
size_t reserve,
size_t* size);
size_t* size,
uint32_t flags);
/**
* Fault Tolerance Event Notification Function

Просмотреть файл

@ -1045,7 +1045,8 @@ rdma_send_info_send(ompi_osc_rdma_module_t *module,
bml_btl = peer_send_info->bml_btl;
mca_bml_base_alloc(bml_btl, &descriptor, MCA_BTL_NO_ORDER,
sizeof(ompi_osc_rdma_rdma_info_header_t));
sizeof(ompi_osc_rdma_rdma_info_header_t),
MCA_BTL_DES_FLAGS_PRIORITY);
if (NULL == descriptor) {
ret = OMPI_ERR_TEMP_OUT_OF_RESOURCE;
goto cleanup;
@ -1241,14 +1242,11 @@ setup_rdma(ompi_osc_rdma_module_t *module)
0,
&convertor);
peer_info->local_descriptors[index] =
bml_btl->btl_prepare_dst(bml_btl->btl,
bml_btl->btl_endpoint,
mca_bml_base_prepare_dst(bml_btl,
peer_info->local_registrations[index],
&convertor,
MCA_BTL_NO_ORDER,
0,
&size);
&convertor, MCA_BTL_NO_ORDER, 0, &size, 0,
&peer_info->local_descriptors[index]);
if (NULL == peer_info->local_descriptors[index]) {
if (NULL != peer_info->local_registrations[index]) {
btl_mpool->mpool_deregister(btl_mpool,

Просмотреть файл

@ -173,14 +173,9 @@ ompi_osc_rdma_sendreq_rdma(ompi_osc_rdma_module_t *module,
rdma_btl = &(module->m_peer_info[target].peer_btls[index]);
if (sendreq->req_type == OMPI_OSC_RDMA_PUT) {
descriptor = rdma_btl->bml_btl->
btl_prepare_src(rdma_btl->bml_btl->btl,
rdma_btl->bml_btl->btl_endpoint,
NULL, /* BWB - fix me */
&sendreq->req_origin_convertor,
rdma_btl->rdma_order,
0,
&size);
mca_bml_base_prepare_src(rdma_btl->bml_btl, NULL,
&sendreq->req_origin_convertor, rdma_btl->rdma_order,
0, &size, 0, &descriptor);
assert(NULL != descriptor);
@ -208,14 +203,9 @@ ompi_osc_rdma_sendreq_rdma(ompi_osc_rdma_module_t *module,
rdma_btl->bml_btl->btl_endpoint,
descriptor);
} else {
descriptor = rdma_btl->bml_btl->
btl_prepare_dst(rdma_btl->bml_btl->btl,
rdma_btl->bml_btl->btl_endpoint,
NULL, /* BWB - fix me */
&sendreq->req_origin_convertor,
rdma_btl->rdma_order,
0,
&size);
mca_bml_base_prepare_dst(rdma_btl->bml_btl,
NULL, &sendreq->req_origin_convertor, rdma_btl->rdma_order,
0, &size, 0, &descriptor);
assert(NULL != descriptor);
@ -457,7 +447,7 @@ ompi_osc_rdma_sendreq_send(ompi_osc_rdma_module_t *module,
mca_bml_base_alloc(bml_btl, &descriptor, MCA_BTL_NO_ORDER,
module->m_use_buffers ? bml_btl->btl_eager_limit :
needed_len < bml_btl->btl_eager_limit ? needed_len :
bml_btl->btl_eager_limit);
bml_btl->btl_eager_limit, MCA_BTL_DES_FLAGS_PRIORITY);
if (NULL == descriptor) {
ret = OMPI_ERR_TEMP_OUT_OF_RESOURCE;
goto cleanup;
@ -699,7 +689,7 @@ ompi_osc_rdma_replyreq_send(ompi_osc_rdma_module_t *module,
endpoint = (mca_bml_base_endpoint_t*) replyreq->rep_origin_proc->proc_bml;
bml_btl = mca_bml_base_btl_array_get_next(&endpoint->btl_eager);
mca_bml_base_alloc(bml_btl, &descriptor, MCA_BTL_NO_ORDER,
bml_btl->btl_eager_limit);
bml_btl->btl_eager_limit, MCA_BTL_DES_FLAGS_PRIORITY);
if (NULL == descriptor) {
ret = OMPI_ERR_TEMP_OUT_OF_RESOURCE;
goto cleanup;
@ -1260,7 +1250,8 @@ ompi_osc_rdma_control_send(ompi_osc_rdma_module_t *module,
endpoint = (mca_bml_base_endpoint_t*) proc->proc_bml;
bml_btl = mca_bml_base_btl_array_get_next(&endpoint->btl_eager);
mca_bml_base_alloc(bml_btl, &descriptor, MCA_BTL_NO_ORDER,
sizeof(ompi_osc_rdma_control_header_t));
sizeof(ompi_osc_rdma_control_header_t),
MCA_BTL_DES_FLAGS_PRIORITY);
if (NULL == descriptor) {
ret = OMPI_ERR_TEMP_OUT_OF_RESOURCE;
goto cleanup;
@ -1321,7 +1312,8 @@ ompi_osc_rdma_rdma_ack_send(ompi_osc_rdma_module_t *module,
/* Get a BTL and a fragment to go with it */
mca_bml_base_alloc(bml_btl, &descriptor, rdma_btl->rdma_order,
sizeof(ompi_osc_rdma_control_header_t));
sizeof(ompi_osc_rdma_control_header_t),
MCA_BTL_DES_FLAGS_PRIORITY);
if (NULL == descriptor) {
ret = OMPI_ERR_TEMP_OUT_OF_RESOURCE;
goto cleanup;

Просмотреть файл

@ -803,7 +803,7 @@ void mca_pml_dr_recv_frag_ack(
/* allocate descriptor */
mca_bml_base_alloc(bml_btl, &des, MCA_BTL_NO_ORDER,
sizeof(mca_pml_dr_ack_hdr_t));
sizeof(mca_pml_dr_ack_hdr_t), MCA_BTL_DES_FLAGS_PRIORITY);
if(NULL == des) {
goto retry;
}

Просмотреть файл

@ -184,7 +184,7 @@ void mca_pml_dr_recv_request_ack(
do_csum = mca_pml_dr.enable_csum &&
(bml_btl->btl_flags & MCA_BTL_FLAGS_NEED_CSUM);
mca_bml_base_alloc(bml_btl, &des, MCA_BTL_NO_ORDER,
sizeof(mca_pml_dr_ack_hdr_t));
sizeof(mca_pml_dr_ack_hdr_t), MCA_BTL_DES_FLAGS_PRIORITY);
if(NULL == des) {
return;
}

Просмотреть файл

@ -384,7 +384,8 @@ int mca_pml_dr_send_request_start_buffered(
/* allocate descriptor */
mca_bml_base_alloc(bml_btl, &descriptor, MCA_BTL_NO_ORDER,
sizeof(mca_pml_dr_rendezvous_hdr_t) + size);
sizeof(mca_pml_dr_rendezvous_hdr_t) + size,
MCA_BTL_DES_FLAGS_PRIORITY);
if(NULL == descriptor) {
return OMPI_ERR_OUT_OF_RESOURCE;
}
@ -498,7 +499,8 @@ int mca_pml_dr_send_request_start_copy(
/* allocate descriptor */
mca_bml_base_alloc(bml_btl, &descriptor,
MCA_BTL_NO_ORDER,
sizeof(mca_pml_dr_match_hdr_t) + size);
sizeof(mca_pml_dr_match_hdr_t) + size,
MCA_BTL_DES_FLAGS_PRIORITY);
if(NULL == descriptor) {
return OMPI_ERR_OUT_OF_RESOURCE;
}
@ -587,7 +589,8 @@ int mca_pml_dr_send_request_start_prepare(
MCA_BTL_NO_ORDER,
sizeof(mca_pml_dr_match_hdr_t),
&size,
&descriptor);
MCA_BTL_DES_FLAGS_PRIORITY,
&descriptor );
if(NULL == descriptor) {
return OMPI_ERR_OUT_OF_RESOURCE;
}
@ -656,7 +659,8 @@ int mca_pml_dr_send_request_start_rndv(
mca_bml_base_alloc( bml_btl,
&des,
MCA_BTL_NO_ORDER,
sizeof(mca_pml_dr_rendezvous_hdr_t) );
sizeof(mca_pml_dr_rendezvous_hdr_t),
MCA_BTL_DES_FLAGS_PRIORITY );
} else {
mca_bml_base_prepare_src( bml_btl,
NULL,
@ -664,7 +668,8 @@ int mca_pml_dr_send_request_start_rndv(
MCA_BTL_NO_ORDER,
sizeof(mca_pml_dr_rendezvous_hdr_t),
&size,
&des);
MCA_BTL_DES_FLAGS_PRIORITY,
&des );
}
if(NULL == des) {
@ -775,6 +780,7 @@ int mca_pml_dr_send_request_schedule(mca_pml_dr_send_request_t* sendreq)
MCA_BTL_NO_ORDER,
sizeof(mca_pml_dr_frag_hdr_t),
&size,
0,
&des );
if(des == NULL) {
OPAL_THREAD_LOCK(&ompi_request_lock);
@ -898,6 +904,7 @@ int mca_pml_dr_send_request_schedule(mca_pml_dr_send_request_t* sendreq)
MCA_BTL_NO_ORDER,
sizeof(mca_pml_dr_frag_hdr_t),
&size,
0,
&des );
if(des == NULL) {
OPAL_THREAD_LOCK(&mca_pml_dr.lock);

Просмотреть файл

@ -375,7 +375,8 @@ do { \
\
des_old = sendreq->req_descriptor; \
mca_bml_base_alloc(vfrag->bml_btl, &des_new, \
MCA_BTL_NO_ORDER, des_old->des_src->seg_len); \
MCA_BTL_NO_ORDER, des_old->des_src->seg_len, \
des_old->des_flags); \
sendreq->req_descriptor = des_new; \
memcpy(des_new->des_src->seg_addr.pval, \
des_old->des_src->seg_addr.pval, \
@ -408,7 +409,8 @@ do { \
assert(sendreq->req_descriptor->des_src != NULL); \
mca_bml_base_alloc(bml_btl, &des_new, \
MCA_BTL_NO_ORDER, \
sizeof(mca_pml_dr_rendezvous_hdr_t)); \
sizeof(mca_pml_dr_rendezvous_hdr_t), \
des_old->des_flags); \
des_old = sendreq->req_descriptor; \
/* build hdr */ \
hdr = (mca_pml_dr_hdr_t*)des_new->des_src->seg_addr.pval; \

Просмотреть файл

@ -330,7 +330,8 @@ int mca_pml_ob1_send_fin( ompi_proc_t* proc,
mca_pml_ob1_fin_hdr_t* hdr;
int rc;
mca_bml_base_alloc(bml_btl, &fin, order, sizeof(mca_pml_ob1_fin_hdr_t));
mca_bml_base_alloc(bml_btl, &fin, order, sizeof(mca_pml_ob1_fin_hdr_t),
MCA_BTL_DES_FLAGS_PRIORITY);
if(NULL == fin) {
MCA_PML_OB1_ADD_FIN_TO_PENDING(proc, hdr_des, bml_btl, order, status);

Просмотреть файл

@ -190,7 +190,7 @@ int mca_pml_ob1_recv_request_ack_send_btl(
/* allocate descriptor */
mca_bml_base_alloc(bml_btl, &des, MCA_BTL_NO_ORDER,
sizeof(mca_pml_ob1_ack_hdr_t));
sizeof(mca_pml_ob1_ack_hdr_t), MCA_BTL_DES_FLAGS_PRIORITY);
if( OPAL_UNLIKELY(NULL == des) ) {
return OMPI_ERR_OUT_OF_RESOURCE;
}
@ -353,6 +353,7 @@ int mca_pml_ob1_recv_request_get_frag( mca_pml_ob1_rdma_frag_t* frag )
MCA_BTL_NO_ORDER,
0,
&frag->rdma_length,
0,
&descriptor );
if( OPAL_UNLIKELY(NULL == descriptor) ) {
frag->rdma_length = save_size;
@ -658,7 +659,7 @@ int mca_pml_ob1_recv_request_schedule_once(
/* prepare a descriptor for RDMA */
mca_bml_base_prepare_dst(bml_btl, reg,
&recvreq->req_recv.req_base.req_convertor,
MCA_BTL_NO_ORDER, 0, &size, &dst);
MCA_BTL_NO_ORDER, 0, &size, 0, &dst);
OPAL_THREAD_UNLOCK(&recvreq->lock);
if(OPAL_UNLIKELY(dst == NULL)) {
@ -675,7 +676,8 @@ int mca_pml_ob1_recv_request_schedule_once(
(dst->des_dst_cnt-1));
}
mca_bml_base_alloc(bml_btl, &ctl, MCA_BTL_NO_ORDER, hdr_size);
mca_bml_base_alloc(bml_btl, &ctl, MCA_BTL_NO_ORDER, hdr_size,
MCA_BTL_DES_FLAGS_PRIORITY);
if( OPAL_UNLIKELY(NULL == ctl) ) {
mca_bml_base_free(bml_btl,dst);

Просмотреть файл

@ -328,7 +328,9 @@ int mca_pml_ob1_send_request_start_buffered(
/* allocate descriptor */
mca_bml_base_alloc(bml_btl, &descriptor,
MCA_BTL_NO_ORDER, sizeof(mca_pml_ob1_rendezvous_hdr_t) + size);
MCA_BTL_NO_ORDER,
sizeof(mca_pml_ob1_rendezvous_hdr_t) + size,
MCA_BTL_DES_FLAGS_PRIORITY);
if( OPAL_UNLIKELY(NULL == descriptor) ) {
return OMPI_ERR_OUT_OF_RESOURCE;
}
@ -442,7 +444,8 @@ int mca_pml_ob1_send_request_start_copy( mca_pml_ob1_send_request_t* sendreq,
/* allocate descriptor */
mca_bml_base_alloc( bml_btl, &descriptor,
MCA_BTL_NO_ORDER,
sizeof(mca_pml_ob1_match_hdr_t) + size );
sizeof(mca_pml_ob1_match_hdr_t) + size,
MCA_BTL_DES_FLAGS_PRIORITY);
if( OPAL_UNLIKELY(NULL == descriptor) ) {
return OMPI_ERR_OUT_OF_RESOURCE;
}
@ -522,7 +525,8 @@ int mca_pml_ob1_send_request_start_prepare( mca_pml_ob1_send_request_t* sendreq,
MCA_BTL_NO_ORDER,
sizeof(mca_pml_ob1_match_hdr_t),
&size,
&descriptor);
MCA_BTL_DES_FLAGS_PRIORITY,
&descriptor );
if( OPAL_UNLIKELY(NULL == descriptor) ) {
return OMPI_ERR_OUT_OF_RESOURCE;
}
@ -604,6 +608,7 @@ int mca_pml_ob1_send_request_start_rdma(
MCA_BTL_NO_ORDER,
0,
&size,
0,
&src );
if( OPAL_UNLIKELY(NULL == src) ) {
ompi_convertor_set_position(&sendreq->req_send.req_base.req_convertor,
@ -615,9 +620,12 @@ int mca_pml_ob1_send_request_start_rdma(
/* allocate space for get hdr + segment list */
mca_bml_base_alloc(bml_btl, &des, MCA_BTL_NO_ORDER,
sizeof(mca_pml_ob1_rget_hdr_t) + (sizeof(mca_btl_base_segment_t)*(src->des_src_cnt-1)));
sizeof(mca_pml_ob1_rget_hdr_t) +
(sizeof(mca_btl_base_segment_t) * (src->des_src_cnt-1)),
MCA_BTL_DES_FLAGS_PRIORITY);
if( OPAL_UNLIKELY(NULL == des) ) {
ompi_convertor_set_position(&sendreq->req_send.req_base.req_convertor,
ompi_convertor_set_position(
&sendreq->req_send.req_base.req_convertor,
&old_position);
mca_bml_base_free(bml_btl, src);
return OMPI_ERR_OUT_OF_RESOURCE;
@ -676,7 +684,9 @@ int mca_pml_ob1_send_request_start_rdma(
*/
mca_bml_base_alloc(bml_btl, &des,
MCA_BTL_NO_ORDER, sizeof(mca_pml_ob1_rendezvous_hdr_t));
MCA_BTL_NO_ORDER,
sizeof(mca_pml_ob1_rendezvous_hdr_t),
MCA_BTL_DES_FLAGS_PRIORITY);
if( OPAL_UNLIKELY(NULL == des)) {
return OMPI_ERR_OUT_OF_RESOURCE;
}
@ -749,7 +759,8 @@ int mca_pml_ob1_send_request_start_rndv( mca_pml_ob1_send_request_t* sendreq,
mca_bml_base_alloc( bml_btl,
&des,
MCA_BTL_NO_ORDER,
sizeof(mca_pml_ob1_rendezvous_hdr_t) );
sizeof(mca_pml_ob1_rendezvous_hdr_t),
MCA_BTL_DES_FLAGS_PRIORITY );
} else {
mca_bml_base_prepare_src( bml_btl,
NULL,
@ -757,6 +768,7 @@ int mca_pml_ob1_send_request_start_rndv( mca_pml_ob1_send_request_t* sendreq,
MCA_BTL_NO_ORDER,
sizeof(mca_pml_ob1_rendezvous_hdr_t),
&size,
MCA_BTL_DES_FLAGS_PRIORITY,
&des );
}
@ -964,7 +976,8 @@ cannot_pack:
mca_bml_base_prepare_src(bml_btl, NULL,
&sendreq->req_send.req_base.req_convertor,
MCA_BTL_NO_ORDER,
sizeof(mca_pml_ob1_frag_hdr_t), &size, &des);
sizeof(mca_pml_ob1_frag_hdr_t),
&size, 0, &des);
if( OPAL_UNLIKELY(des == NULL || size == 0) ) {
if(des) {
@ -1092,6 +1105,7 @@ int mca_pml_ob1_send_request_put_frag( mca_pml_ob1_rdma_frag_t* frag )
MCA_BTL_NO_ORDER,
0,
&frag->rdma_length,
0,
&des );
if( OPAL_UNLIKELY(NULL == des) ) {