Add a MCA parameter to fix the size of the maximum buffer that can be allocated by TCP (tcp_frag_size).
This commit was SVN r3390.
Этот коммит содержится в:
родитель
8c0d5522b1
Коммит
34895b9145
@ -36,13 +36,14 @@ struct mca_ptl_tcp_component_t {
|
||||
size_t tcp_max_ptl_modules; /**< maximum number of ptls - available kernel ifs */
|
||||
int tcp_listen_sd; /**< listen socket for incoming connection requests */
|
||||
unsigned short tcp_listen_port; /**< listen port */
|
||||
char* tcp_if_include; /**< comma seperated list of interface to include */
|
||||
char* tcp_if_exclude; /**< comma seperated list of interface to exclude */
|
||||
int tcp_free_list_num; /**< initial size of free lists */
|
||||
int tcp_free_list_max; /**< maximum size of free lists */
|
||||
int tcp_free_list_inc; /**< number of elements to alloc when growing free lists */
|
||||
int tcp_sndbuf; /**< socket sndbuf size */
|
||||
int tcp_rcvbuf; /**< socket rcvbuf size */
|
||||
char* tcp_if_include; /**< comma seperated list of interface to include */
|
||||
char* tcp_if_exclude; /**< comma seperated list of interface to exclude */
|
||||
int tcp_free_list_num; /**< initial size of free lists */
|
||||
int tcp_free_list_max; /**< maximum size of free lists */
|
||||
int tcp_free_list_inc; /**< number of elements to alloc when growing free lists */
|
||||
int tcp_sndbuf; /**< socket sndbuf size */
|
||||
int tcp_rcvbuf; /**< socket rcvbuf size */
|
||||
size_t tcp_frag_size; /**< buffer limit for the TCP PTL */
|
||||
ompi_free_list_t tcp_send_frags; /**< free list of tcp send fragments */
|
||||
ompi_free_list_t tcp_recv_frags; /**< free list of tcp recv fragments */
|
||||
ompi_hash_table_t tcp_procs; /**< hash table of tcp proc structures */
|
||||
|
@ -182,7 +182,14 @@ int mca_ptl_tcp_component_open(void)
|
||||
mca_ptl_tcp_param_register_int("min_frag_size", 64*1024);
|
||||
mca_ptl_tcp_module.super.ptl_max_frag_size =
|
||||
mca_ptl_tcp_param_register_int("max_frag_size", -1);
|
||||
|
||||
/* the tcp allocator will never allocate buffers with more than this size */
|
||||
mca_ptl_tcp_component.tcp_frag_size =
|
||||
mca_ptl_tcp_param_register_int("frag_size", 16*1024);
|
||||
/* adapt the first fragment size to fit with the allowed fragment size */
|
||||
if( (mca_ptl_tcp_component.tcp_frag_size != 0) &&
|
||||
(mca_ptl_tcp_module.super.ptl_first_frag_size > mca_ptl_tcp_component.tcp_frag_size) ) {
|
||||
mca_ptl_tcp_module.super.ptl_first_frag_size = mca_ptl_tcp_component.tcp_frag_size;
|
||||
}
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -48,9 +48,13 @@ static void mca_ptl_tcp_send_frag_destruct(mca_ptl_tcp_send_frag_t* frag)
|
||||
{
|
||||
}
|
||||
|
||||
extern mca_ptl_tcp_component_t mca_ptl_tcp_component;
|
||||
|
||||
void* mca_ptl_tcp_memalloc( unsigned int* length )
|
||||
{
|
||||
return malloc( *length );
|
||||
if( (*length) > mca_ptl_tcp_component.tcp_frag_size )
|
||||
*length = mca_ptl_tcp_component.tcp_frag_size;
|
||||
return malloc( *length );
|
||||
}
|
||||
|
||||
/*
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user