X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lnet%2Fklnds%2Fptllnd%2Fptllnd.h;h=5f817cb23d18e0900d13d9d641c7de2d777a89f5;hb=4de2841b30bae846092ed092d388a1b59f459b8b;hp=8b25d0f34f6ecbf3cb8ef9668bc8841dc8a8304f;hpb=4588fda6626ef5f8b043c185be69211ddfae57b1;p=fs%2Flustre-release.git diff --git a/lnet/klnds/ptllnd/ptllnd.h b/lnet/klnds/ptllnd/ptllnd.h index 8b25d0f..5f817cb 100755 --- a/lnet/klnds/ptllnd/ptllnd.h +++ b/lnet/klnds/ptllnd/ptllnd.h @@ -95,7 +95,7 @@ # define PTLLND_N_SCHED 1 /* # schedulers */ #endif -#define PTLLND_CREDIT_HIGHWATER ((*kptllnd_tunables.kptl_peercredits)-1) +#define PTLLND_CREDIT_HIGHWATER ((*kptllnd_tunables.kptl_peertxcredits)-1) /* when eagerly to return credits */ typedef struct @@ -110,13 +110,15 @@ typedef struct int *kptl_rxb_npages; /* number of pages for rx buffer */ int *kptl_rxb_nspare; /* number of spare rx buffers */ int *kptl_credits; /* number of credits */ - int *kptl_peercredits; /* number of credits */ + int *kptl_peertxcredits; /* number of peer tx credits */ + int *kptl_peerrtrcredits; /* number of peer router credits */ int *kptl_max_msg_size; /* max immd message size*/ int *kptl_peer_hash_table_size; /* # slots in peer hash table */ int *kptl_reschedule_loops; /* scheduler yield loops */ int *kptl_ack_puts; /* make portals ack PUTs */ #ifdef CRAY_XT3 int *kptl_ptltrace_on_timeout; /* dump pltrace on timeout? */ + int *kptl_ptltrace_on_fail; /* dump pltrace on PTL_NAL_FAILED? */ char **kptl_ptltrace_basename; /* ptltrace dump file basename */ #endif #ifdef PJK_DEBUGGING @@ -282,6 +284,7 @@ struct kptl_data struct list_head kptl_sched_rxbq; /* rxb requiring reposting */ wait_queue_head_t kptl_watchdog_waitq; /* watchdog sleeps here */ + atomic_t kptl_needs_ptltrace; /* watchdog thread to dump ptltrace */ kptl_rx_buffer_pool_t kptl_rx_buffer_pool; /* rx buffer pool */ cfs_mem_cache_t* kptl_rx_cache; /* rx descripter cache */ @@ -336,6 +339,17 @@ kptllnd_lnet2ptlnid(lnet_nid_t lnet_nid) #endif } +static inline void +kptllnd_schedule_ptltrace_dump (void) +{ +#ifdef CRAY_XT3 + if (*kptllnd_tunables.kptl_ptltrace_on_fail) { + atomic_inc(&kptllnd_data.kptl_needs_ptltrace); + wake_up(&kptllnd_data.kptl_watchdog_waitq); + } +#endif +} + int kptllnd_startup(lnet_ni_t *ni); void kptllnd_shutdown(lnet_ni_t *ni); int kptllnd_ctl(lnet_ni_t *ni, unsigned int cmd, void *arg); @@ -512,14 +526,14 @@ kptllnd_reserve_buffers(int n) static inline int kptllnd_peer_reserve_buffers(void) { - return kptllnd_reserve_buffers(*kptllnd_tunables.kptl_peercredits); + return kptllnd_reserve_buffers(*kptllnd_tunables.kptl_peertxcredits); } static inline void kptllnd_peer_unreserve_buffers(void) { kptllnd_rx_buffer_pool_unreserve(&kptllnd_data.kptl_rx_buffer_pool, - *kptllnd_tunables.kptl_peercredits); + *kptllnd_tunables.kptl_peertxcredits); } /* @@ -528,6 +542,8 @@ kptllnd_peer_unreserve_buffers(void) int kptllnd_setup_tx_descs(void); void kptllnd_cleanup_tx_descs(void); void kptllnd_tx_fini(kptl_tx_t *tx); +void kptllnd_cancel_txlist(struct list_head *peerq, struct list_head *txs); +void kptllnd_restart_txs(lnet_process_id_t target, struct list_head *restarts); kptl_tx_t *kptllnd_get_idle_tx(enum kptl_tx_type purpose); void kptllnd_tx_callback(ptl_event_t *ev); const char *kptllnd_tx_typestr(int type);