Skip to content

Commit b7cf4ce

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(#13404) [1]. Link: #13404 [1] Signed-off-by: Troy Mitchell <[email protected]>
1 parent 5bc21ea commit b7cf4ce

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
@@ -103,7 +103,7 @@ static int sm_btl_first_time_init(mca_btl_sm_t *sm_btl, int n)
103103
/* initialize free list for small send and inline fragments */
104104
rc = opal_free_list_init(&component->sm_frags_user, sizeof(mca_btl_sm_frag_t),
105105
opal_cache_line_size, OBJ_CLASS(mca_btl_sm_frag_t),
106-
mca_btl_sm_component.max_inline_send + sizeof(mca_btl_sm_frag_t),
106+
mca_btl_sm_component.max_inline_send + sizeof(mca_btl_sm_hdr_t),
107107
opal_cache_line_size, component->sm_free_list_num,
108108
component->sm_free_list_max, component->sm_free_list_inc,
109109
component->mpool, 0, NULL, mca_btl_sm_frag_init,
@@ -115,7 +115,7 @@ static int sm_btl_first_time_init(mca_btl_sm_t *sm_btl, int n)
115115
/* initialize free list for buffered send fragments */
116116
rc = opal_free_list_init(&component->sm_frags_eager, sizeof(mca_btl_sm_frag_t),
117117
opal_cache_line_size, OBJ_CLASS(mca_btl_sm_frag_t),
118-
mca_btl_sm.super.btl_eager_limit + sizeof(mca_btl_sm_frag_t),
118+
mca_btl_sm.super.btl_eager_limit + sizeof(mca_btl_sm_hdr_t),
119119
opal_cache_line_size, component->sm_free_list_num,
120120
component->sm_free_list_max, component->sm_free_list_inc,
121121
component->mpool, 0, NULL, mca_btl_sm_frag_init,
@@ -128,7 +128,7 @@ static int sm_btl_first_time_init(mca_btl_sm_t *sm_btl, int n)
128128
/* initialize free list for buffered send fragments */
129129
rc = opal_free_list_init(&component->sm_frags_max_send, sizeof(mca_btl_sm_frag_t),
130130
opal_cache_line_size, OBJ_CLASS(mca_btl_sm_frag_t),
131-
mca_btl_sm.super.btl_max_send_size + sizeof(mca_btl_sm_frag_t),
131+
mca_btl_sm.super.btl_max_send_size + sizeof(mca_btl_sm_hdr_t),
132132
opal_cache_line_size, component->sm_free_list_num,
133133
component->sm_free_list_max, component->sm_free_list_inc,
134134
component->mpool, 0, NULL, mca_btl_sm_frag_init,

0 commit comments

Comments
 (0)