From bc38b45677aed4f883e1d1bc5ccd0dd213c7ba92 Mon Sep 17 00:00:00 2001 From: eeb Date: Fri, 30 Jan 2004 23:43:14 +0000 Subject: [PATCH] * Cray compatibility fixes. - Added #if CRAY_PORTALS for compiling against cray portals. - PTLRPC_MTU, PTLRPC_MAX_IOV derived from PTL_MTU, PTL_MAX_IOV if defined. - PTLRPC_MAX_BRW_PAGES, PTLRPC_MAX_IOV defined consistently from PTLRPC_MTU, PTLRPC_MAX_IOV, and are the constants used by the OSC. - Changed bulk descriptors to merge contiguous fragments. Bulk I/O only uses iovs/kiovs if # frags > 1. If compiling with cray kernel portals, PTL_MD_PHYS is expected to be defined and bulk descriptors contain struct iovec with physical addresses. NB. Cray requested this method, rather than the ptl_kiov_t our portals uses. If they can't use physical addresses (we can always turn PTLRPC_MAX_BRW_PAGES down to 1 until they can handle multiple frags), we have a problem, since we'll have to re-write the old kmap/kunmap code. - Added PtlSnprintHandle(char *str, int str_len, ptl_handle_any_t handle) to keep handles opaque but provide useful debug messages. - Implemented PtlEQPoll(), and PtlEQGet()/PtlEQWait() in terms of it. Fixed tcpnal non-busy wait hack by changing nal::yield() to take a timeout and do the right locking, and cb_callback() to schedule waiting processes. Implemented non-busy wait for socknal and qswnal as programming examples (we don't actually drain event queues in the kernel) and cleaned up tcpnal to only schedule when required. - Conformed to the portals spec on... . PTL_TIME_FOREVER . PTL_EQ_HANDLER_NONE . PTL_NI_OK . event field names . PTL_MD_MAX_SIZE usage - Defined PTL_EVENT_XXX_{START,END}. We don't actually implement START events, but rather LASSERT() our callers have disabled them. - Added liblustre/cray callback handling. - #define PTLRPC_MD_OPTIONS as lustre's MD options. Includes the "Hello Cray portals; lustre calling" flag and disables start events. - Removed PTL_MD_AUTO_UNLINK; it's specified in the 'unlink' parameter of PtlMDBind/Attach() etc. * Other fixes/cleanups - Removed 'struct lustre_peer' - Added liblustre/tests/.cvsignore - Removed PtlNIBarrier() and some cruddy portals globals. - Fixed lib_msg_alloc() to allocate ATOMIC if necessary (NB socknal never needs ATOMIC here, neither does qswnal if EKC is tuned properly). - Fixed lib_finalize() to only unlink if the MD was created with PTL_UNLINK (lustre always does, so we never noticed this before). - Cleaned up our asynchronous PtlMDUnlink()....>PTL_EVENT_UNLINK to invalidate the MD handle immediately on the unlink (manual and automatic). - factored some common code in lib-move.c --- lnet/include/lnet/nal.h | 2 +- lustre/portals/include/portals/nal.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lnet/include/lnet/nal.h b/lnet/include/lnet/nal.h index 7cb3ab7..53e9f9b 100644 --- a/lnet/include/lnet/nal.h +++ b/lnet/include/lnet/nal.h @@ -27,7 +27,7 @@ struct nal_t { int (*validate) (nal_t * nal, void *base, size_t extent); - void (*yield) (nal_t * nal); + int (*yield) (nal_t * nal, unsigned long *flags, int milliseconds); void (*lock) (nal_t * nal, unsigned long *flags); diff --git a/lustre/portals/include/portals/nal.h b/lustre/portals/include/portals/nal.h index 7cb3ab7..53e9f9b 100644 --- a/lustre/portals/include/portals/nal.h +++ b/lustre/portals/include/portals/nal.h @@ -27,7 +27,7 @@ struct nal_t { int (*validate) (nal_t * nal, void *base, size_t extent); - void (*yield) (nal_t * nal); + int (*yield) (nal_t * nal, unsigned long *flags, int milliseconds); void (*lock) (nal_t * nal, unsigned long *flags); -- 1.8.3.1