From: Jeffrey Altman Date: Tue, 19 Apr 2005 06:14:14 +0000 (+0000) Subject: STABLE14-windows-rx-ts-fpq-20050418 X-Git-Tag: openafs-devel-1_3_82~46 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=0b5fda4f1a41a1a03a827f1c180e0a6a5c04e4f3;p=packages%2Fo%2Fopenafs.git STABLE14-windows-rx-ts-fpq-20050418 FIXES 17805 Add a new function called rx_StartClientThread() which parallels the behavior of rx_StartServer but is used for initializing client threads. ==================== This delta was composed from multiple commits as part of the CVS->Git migration. The checkin message with each commit was inconsistent. The following are the additional commit messages. ==================== FIXES 17805 Add a new function called rx_StartClientThread() which parallels the behavior of rx_StartServer but is used for initializing client threads. Disable use of RX_TSFPQ_ENABLE on Windows as it slows the client down. (cherry picked from commit c630f81194666e438d93b79fc2510d112050e524) --- diff --git a/src/libafsrpc/afsrpc.def b/src/libafsrpc/afsrpc.def index 00bc3da9a..69feb9674 100644 --- a/src/libafsrpc/afsrpc.def +++ b/src/libafsrpc/afsrpc.def @@ -212,5 +212,6 @@ EXPORTS RXAFS_ResidencyCmd @217 StartRXAFS_FetchData64 @218 StartRXAFS_StoreData64 @219 + rx_StartClientThread @220 diff --git a/src/rx/rx.c b/src/rx/rx.c index 55c45a779..5f129ac12 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -663,6 +663,22 @@ rxi_StartServerProcs(int nExistingProcs) } #endif /* KERNEL */ +#ifdef AFS_NT40_ENV +/* This routine is only required on Windows */ +void +rx_StartClientThread(void) +{ +#ifdef AFS_PTHREAD_ENV + int pid; + pid = (int) pthread_self(); +#endif /* AFS_PTHREAD_ENV */ +#ifdef RX_ENABLE_TSFPQ + rx_TSFPQMaxProcs++; + RX_TS_FPQ_COMPUTE_LIMITS; +#endif /* RX_ENABLE_TSFPQ */ +} +#endif /* AFS_NT40_ENV */ + /* This routine must be called if any services are exported. If the * donateMe flag is set, the calling process is donated to the server * process pool */ diff --git a/src/rx/rx_globals.h b/src/rx/rx_globals.h index fffb414d0..494738f6c 100644 --- a/src/rx/rx_globals.h +++ b/src/rx/rx_globals.h @@ -208,7 +208,9 @@ EXT struct rx_queue rx_freePacketQueue; } while(0) #ifdef RX_ENABLE_LOCKS EXT afs_kmutex_t rx_freePktQ_lock; -#ifdef AFS_PTHREAD_ENV +#endif /* RX_ENABLE_LOCKS */ + +#if defined(AFS_PTHREAD_ENV) && !defined(AFS_NT40_ENV) #define RX_ENABLE_TSFPQ EXT int rx_TSFPQGlobSize INIT(3); /* number of packets to transfer between global and local queues in one op */ EXT int rx_TSFPQLocalMax INIT(15); /* max number of packets on local FPQ before returning a glob to the global pool */ @@ -298,8 +300,7 @@ EXT void rxi_MorePacketsTSFPQ(int apackets, int flush_global, int num_keep_local RX_FPQ_MARK_FREE(p); \ (rx_ts_info_p)->_FPQ.len++; \ } while(0) -#endif /* AFS_PTHREAD_ENV */ -#endif /* RX_ENABLE_LOCKS */ +#endif /* AFS_PTHREAD_ENV && !AFS_NT40_ENV */ /* Number of free packets */ EXT int rx_nFreePackets INIT(0);