Skip to content

Commit f25ff21

Browse files
btl/sm: fix wrong payload_buffer size during freelist_init
Previously, freelist_init() used payload_buffer = size + sizeof(btl_sm_frag_t), but what we actually need is size + sizeof(btl_sm_hdr_t). More details can be found in issue(open-mpi#13404) [1]. Link: open-mpi#13404 [1] Signed-off-by: Troy Mitchell <[email protected]>
1 parent 67b98be commit f25ff21

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

opal/mca/btl/sm/btl_sm_module.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static int sm_btl_first_time_init(mca_btl_sm_t *sm_btl, int n)
105105
/* initialize free list for small send and inline fragments */
106106
rc = opal_free_list_init(&component->sm_frags_user, sizeof(mca_btl_sm_frag_t),
107107
opal_cache_line_size, OBJ_CLASS(mca_btl_sm_frag_t),
108-
mca_btl_sm_component.max_inline_send + sizeof(mca_btl_sm_frag_t),
108+
mca_btl_sm_component.max_inline_send + sizeof(mca_btl_sm_hdr_t),
109109
opal_cache_line_size, component->sm_free_list_num,
110110
component->sm_free_list_max, component->sm_free_list_inc,
111111
component->mpool, 0, NULL, mca_btl_sm_frag_init,
@@ -117,7 +117,7 @@ static int sm_btl_first_time_init(mca_btl_sm_t *sm_btl, int n)
117117
/* initialize free list for buffered send fragments */
118118
rc = opal_free_list_init(&component->sm_frags_eager, sizeof(mca_btl_sm_frag_t),
119119
opal_cache_line_size, OBJ_CLASS(mca_btl_sm_frag_t),
120-
mca_btl_sm.super.btl_eager_limit + sizeof(mca_btl_sm_frag_t),
120+
mca_btl_sm.super.btl_eager_limit + sizeof(mca_btl_sm_hdr_t),
121121
opal_cache_line_size, component->sm_free_list_num,
122122
component->sm_free_list_max, component->sm_free_list_inc,
123123
component->mpool, 0, NULL, mca_btl_sm_frag_init,
@@ -130,7 +130,7 @@ static int sm_btl_first_time_init(mca_btl_sm_t *sm_btl, int n)
130130
/* initialize free list for buffered send fragments */
131131
rc = opal_free_list_init(&component->sm_frags_max_send, sizeof(mca_btl_sm_frag_t),
132132
opal_cache_line_size, OBJ_CLASS(mca_btl_sm_frag_t),
133-
mca_btl_sm.super.btl_max_send_size + sizeof(mca_btl_sm_frag_t),
133+
mca_btl_sm.super.btl_max_send_size + sizeof(mca_btl_sm_hdr_t),
134134
opal_cache_line_size, component->sm_free_list_num,
135135
component->sm_free_list_max, component->sm_free_list_inc,
136136
component->mpool, 0, NULL, mca_btl_sm_frag_init,

0 commit comments

Comments
 (0)