From a77845f8e6654b368f17a3f14d7ee8e411e0bba1 Mon Sep 17 00:00:00 2001 From: Galen Shipman Date: Thu, 23 Jun 2005 19:57:13 +0000 Subject: [PATCH] More fixes for leave pinned and pre pinned buffers.. This commit was SVN r6156. --- src/mca/bmi/ib/bmi_ib.c | 24 +++++++++++++++++++++--- src/mca/bmi/ib/bmi_ib_component.c | 13 ++++++++----- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/src/mca/bmi/ib/bmi_ib.c b/src/mca/bmi/ib/bmi_ib.c index 8d11a05576..f1143663a9 100644 --- a/src/mca/bmi/ib/bmi_ib.c +++ b/src/mca/bmi/ib/bmi_ib.c @@ -240,7 +240,17 @@ mca_bmi_base_descriptor_t* mca_bmi_ib_prepare_src( ib_bmi = (mca_bmi_ib_module_t*) bmi; - if( max_data+reserve <= bmi->bmi_eager_limit ) { + /** if the data fits in the eager limit and we aren't told to pinn then we + simply pack, if the data fits in the eager limit and the data is non contiguous + then we pack **/ + + if( (max_data+reserve <= bmi->bmi_eager_limit + && NULL == registration + && !mca_bmi_ib_component.leave_pinned) + || + (max_data+reserve <= bmi->bmi_eager_limit + && 1 == ompi_convertor_need_buffers( convertor ))) { + MCA_BMI_IB_FRAG_ALLOC_EAGER(bmi, frag, rc); if(NULL == frag) { return NULL; @@ -265,8 +275,16 @@ mca_bmi_base_descriptor_t* mca_bmi_ib_prepare_src( frag->base.des_flags = 0; return &frag->base; - - }else if( max_data + reserve <= ib_bmi->super.bmi_max_send_size || 1 == ompi_convertor_need_buffers( convertor) ){ + + } + /** if the data fits in the max limit and we aren't told to pinn then we + simply pack, if the data is non contiguous then we pack **/ + + else if((max_data + reserve <= ib_bmi->super.bmi_max_send_size + && NULL == registration + && !mca_bmi_ib_component.leave_pinned) + || 1 == ompi_convertor_need_buffers( convertor)){ + MCA_BMI_IB_FRAG_ALLOC_MAX(bmi, frag, rc); if(NULL == frag) { return NULL; diff --git a/src/mca/bmi/ib/bmi_ib_component.c b/src/mca/bmi/ib/bmi_ib_component.c index c75439f99c..995c35c13e 100644 --- a/src/mca/bmi/ib/bmi_ib_component.c +++ b/src/mca/bmi/ib/bmi_ib_component.c @@ -129,13 +129,16 @@ int mca_bmi_ib_component_open(void) mca_bmi_ib_module.super.bmi_exclusivity = mca_bmi_ib_param_register_int ("exclusivity", 0); mca_bmi_ib_module.super.bmi_eager_limit = - mca_bmi_ib_param_register_int ("eager_limit", - (64*1024)) - sizeof(mca_bmi_ib_header_t); + mca_bmi_ib_param_register_int ("eager_limit", (64*1024)) + - sizeof(mca_bmi_ib_header_t); + mca_bmi_ib_module.super.bmi_min_send_size = - mca_bmi_ib_param_register_int ("min_send_size", - (64*1024))- sizeof(mca_bmi_ib_header_t); + mca_bmi_ib_param_register_int ("min_send_size", (64*1024)) + - sizeof(mca_bmi_ib_header_t); + mca_bmi_ib_module.super.bmi_max_send_size = - mca_bmi_ib_param_register_int ("max_send_size", (128*1024)) - sizeof(mca_bmi_ib_header_t); + mca_bmi_ib_param_register_int ("max_send_size", (128*1024)) + - sizeof(mca_bmi_ib_header_t); mca_bmi_ib_module.ib_pin_min = mca_bmi_ib_param_register_int("ib_pin_min", 128*1024);