2004-10-12 04:17:29 +00:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; -*- */
|
|
|
|
|
2004-11-22 00:37:56 +00:00
|
|
|
/*
|
2004-11-22 01:38:40 +00:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
|
|
* All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
|
|
* All rights reserved.
|
|
|
|
* Copyright (c) 2004 The Ohio State University.
|
|
|
|
* All rights reserved.
|
2004-11-28 20:09:25 +00:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 12:43:37 +00:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2004-11-22 01:38:40 +00:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-11-22 00:37:56 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
2005-09-12 19:55:21 +00:00
|
|
|
#include "ompi_config.h"
|
2004-07-19 19:45:06 +00:00
|
|
|
#include "gm.h"
|
|
|
|
|
2004-11-05 14:53:38 +00:00
|
|
|
struct mca_ptl_gm_send_frag_t;
|
|
|
|
struct mca_ptl_gm_peer_t;
|
2005-04-10 16:20:04 +00:00
|
|
|
struct mca_ptl_gm_module_t;
|
2004-07-19 19:45:06 +00:00
|
|
|
|
2005-04-09 20:27:42 +00:00
|
|
|
/* Pinning down memory pages is a costly operation. We can avoid it by using a LRU list
|
|
|
|
* of pinned down memory, managed inside the GM PTL.
|
|
|
|
*/
|
|
|
|
gm_status_t mca_ptl_gm_register_memory( struct gm_port *port, void *ptr, unsigned len );
|
|
|
|
gm_status_t mca_ptl_gm_deregister_memory( struct gm_port *port, void *ptr, unsigned len );
|
2005-05-04 01:51:32 +00:00
|
|
|
#if OMPI_MCA_PTL_GM_CACHE_ENABLE
|
|
|
|
void mca_ptl_gm_regcache_init(void);
|
|
|
|
unsigned int gmpi_use_interval(struct gm_port *gmpi_gm_port, gm_up_t start, unsigned int length);
|
|
|
|
gm_status_t gmpi_unuse_interval(struct gm_port *gmpi_gm_port, gm_up_t start, unsigned int length);
|
|
|
|
void gmpi_clear_interval(struct gm_port *gmpi_gm_port, gm_up_t start, unsigned int length);
|
|
|
|
void gmpi_clear_all_intervals(void);
|
|
|
|
#endif /* OMPI_MCA_PTL_GM_CACHE_ENABLE */
|
2005-04-09 20:27:42 +00:00
|
|
|
|
2005-01-09 19:42:14 +00:00
|
|
|
/* Some flags that have to go in the header hdr_common.hdr_flags field */
|
2004-12-17 08:39:07 +00:00
|
|
|
#define PTL_FLAG_GM_HAS_FRAGMENT 0x04
|
|
|
|
#define PTL_FLAG_GM_LAST_FRAGMENT 0x08
|
2005-04-09 20:27:42 +00:00
|
|
|
#define PTL_FLAG_GM_REQUIRE_LOCK 0x10
|
2004-09-14 15:29:43 +00:00
|
|
|
|
2005-01-09 19:42:14 +00:00
|
|
|
/* Internal flags for handling long messages */
|
|
|
|
#define GM_PTL_REGISTER_MEMORY 0x01
|
|
|
|
#define GM_PTL_SEND_MESSAGE 0x02
|
2004-11-18 00:23:19 +00:00
|
|
|
|
2004-11-05 14:53:38 +00:00
|
|
|
int mca_ptl_gm_analyze_recv_event( struct mca_ptl_gm_module_t* ptl, gm_recv_event_t* event );
|
2004-08-12 23:37:37 +00:00
|
|
|
|
2004-11-05 14:53:38 +00:00
|
|
|
void mca_ptl_gm_outstanding_recv( struct mca_ptl_gm_module_t *ptl);
|
2004-09-07 21:29:18 +00:00
|
|
|
|
2004-12-22 07:20:05 +00:00
|
|
|
int mca_ptl_gm_peer_send( struct mca_ptl_base_module_t* ptl,
|
|
|
|
struct mca_ptl_base_peer_t* ptl_base_peer,
|
2005-05-09 20:03:58 +00:00
|
|
|
struct mca_ptl_base_send_request_t *sendreq,
|
2004-12-22 07:20:05 +00:00
|
|
|
size_t offset,
|
|
|
|
size_t size,
|
|
|
|
int flags );
|
2004-08-12 23:37:37 +00:00
|
|
|
|
2004-08-30 20:48:13 +00:00
|
|
|
int
|
2004-12-13 05:38:34 +00:00
|
|
|
mca_ptl_gm_peer_send_continue( struct mca_ptl_gm_peer_t *ptl_peer,
|
|
|
|
struct mca_ptl_gm_send_frag_t *fragment,
|
2005-05-09 20:03:58 +00:00
|
|
|
struct mca_ptl_base_send_request_t *sendreq,
|
2004-12-13 05:38:34 +00:00
|
|
|
size_t offset,
|
|
|
|
size_t *size,
|
2004-12-17 08:39:07 +00:00
|
|
|
int flags );
|