310 Commits

Author SHA1 Message Date
Jeffrey Altman
26c7361f2b STABLE14-windows-rx-ehostunreach-20060116
another location where EHOSTUNREACH can be returned
such that we can timeout the request immediately


(cherry picked from commit f7b9cd54e50e553486c2ad850df1a8ecaee0d954)
2006-01-16 16:23:33 +00:00
Chas Williams
d3babf4aa8 STABLE14-solaris-uniqtime32-20051223
FIXES 24445

afs really wants the 32 bit timeval/uniqtime stuff


(cherry picked from commit 5a238125533fc826e3e39250fbc02e59bf352ec4)
2005-12-24 01:09:52 +00:00
Chaskiel M Grundman
36b5ae8ba5 STABLE14-darwin-lost-wakeups-20051223
FIXES 24492

rewrite for tiger to avoid losing wakeups


(cherry picked from commit 856f5288e761e9dfaf720eb38a9bd4e7a053cb0d)
2005-12-24 00:10:02 +00:00
Jeffrey Altman
3765a95183 STABLE14-windows-no-fds-20051217
when collecting rx statistics in response to an RPC query, the rx library
attempts to enumerate the number file descriptors in use.  This is fine
except that file descriptors are a C Run Time Library concept on Windows
and are not related to networking.  In Visual Studio 8, the run time library
will assert() if an invalid file descriptor is passed to fstat() which is
the test used to determine if a file descriptor is valid.

This patch simply returns 0 for the number of file descriptors in use
because that is what would have been returned anyway with the existing
code.  What we probably want to return is the number of open socket
handles.


(cherry picked from commit 8c3cf4b89445d969c9f85e929d5e030f53773f81)
2005-12-17 17:28:31 +00:00
Tom Keiser
348aaa7128 STABLE14-freedatabufs-mark-free-20051215
avoid an error with marking data packets free


(cherry picked from commit 914ac9204801982e1b1b9e827a92cd519ef18bfd)
2005-12-16 03:33:08 +00:00
Rainer Toebbicke
4ac384dde6 STABLE14-rx-osi_alloc-prototype-20051215
FIXES 24267

must provide prototype for osi_Alloc() on systems with 64-bit pointers
and 32-bit int


(cherry picked from commit d00359b24139753b8f6a62c6a9137c8f8ccd3b7e)
2005-12-15 15:16:45 +00:00
Rainer Toebbicke
98feefa7ab STABLE14-rx-osi_alloc-prototype-20051214
FIXES 24267

include rx.h in order to safely include rx_prototypes.h in order
to obtain a prototype for osi_Alloc() in order to prevent pointer
truncation on systems with 64-bit pointers and 32-bit int.


(cherry picked from commit f75b0075a79807eaae4e071ea4d0f3bd60d7f547)
2005-12-15 05:57:12 +00:00
Tom Keiser
5f00e54cfa STABLE14-freepackets-cbuf-leak-20051130
FIXES 23143

at least i'm guessing it fixes that one
fix memory leak for multilevel packet queue stuff


(cherry picked from commit 421e063d9b6500299b5e02b999b22c01dcc7c496)
2005-12-01 04:00:39 +00:00
Jeffrey Altman
ef7490695b STABLE14-rx-lock-leak-20051128
Fix a lock leak introduced when adding thread local packet queues.


(cherry picked from commit ae2f1d3f68266a47d04b62fab577ada30990732c)
2005-11-29 07:01:50 +00:00
Derrick Brashear
4618c84535 STABLE14-macos103-update-20051129
make the kernel module work too


(cherry picked from commit d94337feafeabe053d8fa4c6296ef776e4fd2597)
2005-11-29 06:54:46 +00:00
Tom Keiser
2560315f69 STABLE14-fpq-bulk-free-math-error-20051101
fix a math error here


(cherry picked from commit e2c497b0368b13e84e6a6404c3761e28d40f2119)
2005-11-02 05:23:54 +00:00
Jim Rees
685e2884a6 STABLE14-struct-socket-20051017
rx_prototypes.h needs struct socket now


(cherry picked from commit d5a7daef3c6b91782a3779f00b7b9cb9292c352d)
2005-10-25 07:37:13 +00:00
Niklas Edmundsson
910db4047e STABLE14-aix-warning-cleanup-20051015
FIXES 21066

clean up aix warnings. hint that large file support works


(cherry picked from commit 7c8cf708a06d810bba065e2a49d6ed80e754e1a9)
2005-10-15 15:24:24 +00:00
Jeffrey Altman
3bb26bf7e0 STABLE14-rx-tq-waiter-rework-20051007
Only Broadcast to wake threads if there are threads waiting.


(cherry picked from commit 8299e102c71ae0f3d04c17e089e8f960a7c2bb7e)
2005-10-08 05:00:07 +00:00
Chas Williams
b5af16222a STABLE14-linux-cv-init-20051007
FIXES 20114

fix the CV_INIT macros


(cherry picked from commit 602f2ae816208f49e08667c65a3eee42ecc39041)
2005-10-07 18:23:40 +00:00
Derrick Brashear
a179e005df STABLE14-macos104-20051005
distill out chaskiel's tiger changes and pull them up. this should be fun.
wonder how broken it is.
2005-10-05 06:58:26 +00:00
Jeffrey Altman
7624eff082 STABLE14-rx-send-error-code-propagation-20050916
corrections to rx-send-error-code-propagation-20050915 for bsd


(cherry picked from commit fbba9553640a785bc449672d60870a6fcd043436)
2005-09-21 01:34:13 +00:00
Jeffrey Altman
1d04266db3 STABLE14-windows-rx-debug-tid-20050917
add the thread id to the rx debug output


(cherry picked from commit 8aef0475415d2b67721b06aaad6a6aa47b3f2bf8)
2005-09-17 21:00:39 +00:00
Jeffrey Altman
35bbe6c952 STABLE14-rx-send-error-code-propagation-20050915
* add a version of rxi_DebugPrint for Windows that uses OutputDebugString

* migrate all printf statements to the dpf macro

* stop masking the errors from rx_sendmsg() so that higher level functions
  can make decisions based upon the failure.

* Windows reports EHOSTUNREACHABLE.  Similar to Linux, if it is reported
  reset the send packet start time to 0 in order to immediately cause the
  server to be marked down.


(cherry picked from commit 9ac9185b0feb87eff820963f83a6c861c49bdab5)
2005-09-16 03:28:50 +00:00
Derrick Brashear
05c6baad5e STABLE14-rx-tq-waiter-rework-20050914
heavily reworked by jaltman@secure-endpoints.com
and then a little further editing by me


see if we can avoid doing to sleep forever waiting on the tq to flush

====================
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.
====================

do not decrement tqWaiters in the while evaluation.   This will
result in an invalid count if the value was zero to begin with.


(cherry picked from commit b08017e91f5b4d175b5c9b1f6d68adb9effa3360)
2005-09-14 09:53:12 +00:00
Derrick Brashear
ed70cfb411 STABLE14-rx-no-data-on-call-zero-20050913
hopefully fix sven oehme's problem


(cherry picked from commit bbf6472a111727e739ec5216b431c1c9263af736)
2005-09-14 05:28:25 +00:00
Jeffrey Hutzelman
619dc5e73d STABLE14-rx-propagate-error-20050902
if we have an error propagate it to new calls


(cherry picked from commit 599b57ed78f86eaeb543d67d3955f71865feae1e)
2005-09-02 23:50:59 +00:00
Derrick Brashear
c545a8d505 STABLE14-fix-busyat-enforcement-20050819
FIXES 20659

enforce busyat in the other half of the if


(cherry picked from commit aec3c2b19292c552705f1c0eb3065a26e0b03649)
2005-08-28 21:43:36 +00:00
Chas Williams
d2ee942554 STABLE14-linux-panic-20050727
FIXES 20392

call BUG() instead
2005-08-08 16:01:40 +00:00
Chas Williams
415f772e0c STABLE14-linux-panic-20050727
FIXES 20392

just call panic() on linux
2005-07-27 19:17:46 +00:00
Chas Williams
58bb7856fb STABLE14-linux-reduce-stack-use-20050726
FIXES 20337

don't do pointless work in osi_NetSend, and save some stack


(cherry picked from commit a21fc56daf70d0433276eab29798542f6ef362ad)
2005-07-26 18:42:25 +00:00
Pascal Terjan
960ed96198 STABLE14-coda-xfs-header-defines-fun-20050706
make this better, we should never have been doing it as we were before


(cherry picked from commit f829393c716330b65a96d5cc0c33b2c83e9b4bc4)
2005-07-11 20:13:47 +00:00
Derrick Brashear
f450d8456d STABLE14-rx-queue-macros-rename-20050530
/usr/include/ctype.h on macos 10.3.9 now uses _Q

bah


(cherry picked from commit d9f9724c9562f8ae0115394454dd2dd96ac258ff)
2005-05-31 03:12:25 +00:00
Tom Keiser
b7ec978332 STABLE14-pthread-rxkad-stats-20050529
FIXES 17547

speed up rxkad by keeping stats per-thread


(cherry picked from commit 25b0681893b3c41cfeba213f9a6b7bfd0d85c685)
2005-05-30 05:57:34 +00:00
Tom Keiser
5b9b076796 STABLE14-rx-fpq-bulk-free-20050529
FIXES 19027

After profiling RX for a while, I've found a few more bottlenecks in the
packet handling code.  This patch addresses a couple of these issues.
The major change in this patch is a new API to allow bulk packet
alloc/free ops on rx_queue's of packets.  Benefits include reduced lock
contention on rx_freePktQ_lock, elimination of a lot of unnecessary cache
line invalidates, and reduced register window thrashing on sparc.

In addition, this patch dedicates one rx_packet per thread to rxi_SendAck,
since that function is in the critical path, and represents a large
percentage of execution time.


(cherry picked from commit d049ca2ae4e7708df028fca739c2a35ccb906bfb)
2005-05-30 04:41:45 +00:00
Roman Mitz
b6529a3819 STABLE14-discard-rx-streams-20050524
FIXES 18895

they wouldn't compile anyway. remove references also.

RCS file: /cvs/openafs/src/rx/Attic/rx_stream.c,v
Working file: src/rx/rx_stream.c
head: 1.9
branch:
locks: strict
access list:
keyword substitution: kv
total revisions: 9;	selected revisions: 0
description:

RCS file: /cvs/openafs/src/rx/Attic/rx_stream.h,v
Working file: src/rx/rx_stream.h
head: 1.6
branch:
locks: strict
access list:
keyword substitution: kv
total revisions: 6;	selected revisions: 0
description:


(cherry picked from commit b15721aef16f9b8b689bfc0be01a434f88610919)
2005-05-25 00:14:44 +00:00
Jeffrey Altman
95c5005b38 STABLE14-rx-makecall-race-fix-20050518
On at least one system it was noticed that threads waiting in rx_NewCall
would starve forever (aka deadlock).   This was the result of one out of
two problems related to a race condition on the RX_CONN_MAKECALL_WAITING
bit flag.  This flag was set once in rx_NewCall and cleared in rx_EndCall.
However, it was possible for the flag to be cleared even though there
were additional flags waiting in rx_NewCall.  This was due to a failure
to check the value of makeCallWaiters before clearing the flag and also
due to a failure to properly lock the access to the makeCallWaiters field.

The second problem was an ability to destroy a connection on which threads
are waiting within rx_NewCall.


(cherry picked from commit 10f6e5d6e2960469eb4d0e75f62fa9b33629b132)
2005-05-18 23:03:02 +00:00
Tom Keiser
2152a9eadd STABLE14-rx-fpq-optimize-20050425
FIXES 17805

here's a patch that reduces the overhead of transfers
between the local and global free packet queues. The old algorithm was
O(n) in the number of store instructions -- 7 per rx_packet. I've added
some bulk transfer macros to the rx_queue package. Now, the number of
store instructions is O(1) -- 6 total. This should help reduce bus
contention and cache line invalidates on SMPs.


(cherry picked from commit 35285dad3e20e50f592afa95d994b68ded5c8b2b)
2005-04-25 21:56:03 +00:00
Derrick Brashear
f61c7f0972 STABLE14-linux-global-sunlock-always-20050424
ok, well, in the land of pre-emption i guess we need this always


(cherry picked from commit 3a30e787f2ab5c16bc1fdf34d74f67963ef63155)
2005-04-25 18:20:00 +00:00
Tom Keiser
cec1603004 STABLE14-rx_fpq_take_three-20050420
FIXES 17805

I've been stress testing a patch all weekend that changes the way
thread-local packet quotas are computed.  I was able to replicate the
unbounded packet alloc problem on unix server components by eliminating my
code from rxi_StartServerProcs that sets the maximum number of expected
threads.  This patch makes the upper thread limit get computed on the fly,
adds some thread-local free packet queue statistics, and a few other minor
tweaks.  I still don't have a working windows development environment, so
I can't say whether this will fix all the windows client problems.  But,
the unbounded packet allocation problem should go away with this patch.

stress testing on windows succeeds as well. <jaltman@secure-endpoints.com>


(cherry picked from commit 1099227e08af3df856d8a998746d98405e3ef04b)
2005-04-20 22:23:47 +00:00
Jeffrey Altman
0b5fda4f1a 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)
2005-04-19 06:14:14 +00:00
Derrick Brashear
0816ea0142 STABLE14-kill-struct-osisocket-20050415
FIXES 18079

more complete version of what's in the patch, kill all refs to struct osi_socket in favor of just osi_socket

from  psomogyi@gamax.hu


(cherry picked from commit 2dc87bcf1e632444b163eea94172b77e7d376d5c)
2005-04-15 19:37:14 +00:00
Chas Williams
f8928982a2 STABLE14-kill-rxglock-20050413
FIXES 18222

the rxglock was being defined out by all the platforms, just kill it.


(cherry picked from commit cffa1571bb7122cdd5fc18251685af5a3c5cbaaa)
2005-04-14 05:23:14 +00:00
Tom Keiser
7a811246ff STABLE14-rx-fpq-trying-again-20050413
FIXES 17805

this time we'll work it out on windows. multitier free packet queues to increase performance


(cherry picked from commit 004be0249387802cc7abe45d50c6f8b67c4832d0)
2005-04-14 03:43:36 +00:00
Chas Williams
ae8b3d3f43 STABLE14-kill-rxglock-20050413
FIXES 18222

the rxglock was being defined out by all the platforms, just kill it.


(cherry picked from commit dbeab01c12fd61305b9b5cc9a61036d934db1ce8)
2005-04-14 03:31:32 +00:00
Chas Williams
e3061fc6f9 STABLE14-kill-clock-advance-20050413
FIXES 18228

we don't use clock_Advance, so it's gone


(cherry picked from commit d489574156ff01b0a8ff362c14eb12d9a8642d1f)
2005-04-14 03:10:53 +00:00
Chaskiel M Grundman
f8e75868a9 STABLE14-rx-dont-use-kmutex-outside-linux-kernel-20050413
FIXES 18261

don't use kmutex in prototypes outside linux kernel


(cherry picked from commit 84d997e240979271472721e80980cc6d9f19b9e5)
2005-04-14 01:57:00 +00:00
Derrick Brashear
597bf0feda STABLE14-remove-rx-2tier-freepacketq-20050403
needs more work.


(cherry picked from commit de920422171ab134f2821d1dd2feeb542750a0f7)
2005-04-04 05:27:01 +00:00
Tom Keiser
3718f9a535 STABLE14-rx-2tier-freepacketq-20050403
FIXES 17805

The attached patch turns the rx free packet queue into a 2-tiered cache
with a local thread-specific queue, backed by a global queue when using
pthreaded rx. The patch is against 1.3.79. Preliminary benchmarks show
scalability much closer to 2 cpus on sparc with this patch. Also,
fileserver performance under heavy load is improved: 50% improvement in
throughput for sequential writes, and a 10% improvement in performance for
random writes against an smp sparc solaris 10 fileserver.


(cherry picked from commit 5c6b956257f4f43122d393eaf119ad7616084576)
2005-04-03 21:21:44 +00:00
Chaskiel M Grundman
acac02cf67 STABLE14-rx-clock-rollover-fix-20050403
FIXES 17990

itimer rollover comes faster now; handle it.


(cherry picked from commit c5c9bf0a7896047381d2d07ddaa954b231b7f356)
2005-04-03 21:01:46 +00:00
Andrej Filipcic
e99bc1e809 STABLE14-alpha-linux26-20050403
FIXES 18081

alpha linux26 port


(cherry picked from commit f9971b7729d31ecb08d22dcd3511f924c6681214)
2005-04-03 21:01:11 +00:00
Niklas Edmundsson
2cd086444c STABLE14-aix5-allocator-cleanup-20050403
* Removed memory allocation functions only used on AIX and ancient
   HPUX. If the performance penalty is noticeable, implement a wrapper
   at the osi-level in the same manner as LINUX/FBSD (ie not sprayed
   throughout the code).
* Removed all remnants of splnet()-style locking, it was not
   sufficient for MP anyway which the real locks are. Affects only AIX
   and HPUX.
* Drop the global locking in rxi_Alloc since the real locks do their
   jobs, affects only AIX41 and up (ie. MP capable OS).
* Fix the non-kernel wrapper for osi_Alloc/Free on AIX to take void *
   in the same manner as the rest of the functions. IMO this wrapper
   shouldn't be necessary since you should never ever malloc() 0 bytes,
   but since it's there I'd guess someone made stupid assumptions
   somewhere...
* Restores MAXKTCTICKETLEN to 12000 on AIX
* Restores AFS_LWP_MINSTACKSIZE to 48k on AIX (might affect
   server-stuff)


(cherry picked from commit 412854593cf368006c18e6c0dc607a9ecd76a0e0)
2005-04-03 19:18:54 +00:00
Derrick Brashear
18fb735083 STABLE14-openafs-kill-dead-code-20050403
Code ifdef'd any of AFS_MACH_ENV, AFS_GFS_ENV, AFS_DEC_ENV dies

Code ifdef'd AFS_SUN_ENV either becomes AFS_SUN5_ENV or dies as appropriate,
in the kernel only. The database servers etc are probably still buildable,
and I still have a SunOS 4.1.4 machine. ;-) But the Solaris vnops get all
SunOS 4 code nuked.

Uses of AFS_ALPHA_ENV which secretly meant OSF/1,D/UX,Tru64 become
AFS_OSF_ENV.

Bozon lock use gets its own ifdef. OSF and Solaris define it. Darwin and any
BSDs have bozon lock usage removed: note that only OSF and Solaris were
bothering to *init* the bozon lock during NewVCache. Bozon locks are for
platforms where basically we could end up deadlocking ourselves because of
how locks are handled.

Some nonsensical ifdefs removed.
Some if 0'd code removed.
Some obsolete code (hpux pre-10, for instance) removed.


(cherry picked from commit 706530c295dcf528d7307a524020457a0a6d5f59)
2005-04-03 19:15:35 +00:00
Jeffrey Altman
4632eedcf3 STABLE14-rxdebug-unsigned-20040403
use unsigned types when displaying stat data via printf


(cherry picked from commit 15d82b857efc21fd80f250d2f315e12f8b20db2a)
2005-04-03 06:33:09 +00:00
Derrick Brashear
731165ecda STABLE14-rx-getaddrs-skip-loopback-addr-on-bsd-too-20050326
as reported by Tracy Demarco-White


(cherry picked from commit 4cbe2e7ebfc993a3d09d558cd58757e0b858facd)
2005-03-26 06:55:20 +00:00