Commit Graph

8044 Commits

Author SHA1 Message Date
Simon Wilkinson
ff89a32110 rx: Don't have different args for rxi_FreeCall
rxi_FreeCall changes its number of arguments depending on whether
locks are enabled or not. That's a little bit nasty to read, so just
change it so that it always takes two arguments, and ignores the
second when it doesn't need it.

Change-Id: I5f869bea9bcf01bac16d8c5eec93373788d17978
Reviewed-on: http://gerrit.openafs.org/2863
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-09-30 06:10:20 -07:00
Simon Wilkinson
37946ee173 rx: Make statistics interface use Atomics
Make the rx_statistics statistics gathering infrastructure use
atomics for all of its counters. This significantly reduces
lock contention. However, it also (potentially) changes the format
of the rx_stats variable which has been used by callers in the past.

To simplify this process, and to aid with future changes, we remove
direct access to rx_stats. Instead, two additional API functions
rx_GetStatistics and rx_FreeStatistics are provided. These give the
caller access to an 'normal' rx_statistics structure.

Tom Keiser has suggested that we should explore using thread-local
statistics structures, and just aggregating them when we are asked
to report. This is a fine idea, and is equally possible with the
new interface that this patch introduces.

Change-Id: I859cea8f7354a655be007b95fa8a61f995308b35
Reviewed-on: http://gerrit.openafs.org/2862
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-09-30 06:10:05 -07:00
Simon Wilkinson
1676c7e54f rx: Use atomics for rxi_AllocSize and rxi_AllocCnt
More atomics for RX statistics counters. Less lock contention.

Change-Id: I55202d2d54323448f7bc191aab03ace976fac962
Reviewed-on: http://gerrit.openafs.org/2861
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-09-30 06:09:47 -07:00
Simon Wilkinson
41633936ce rx: Make nWaiting and nWaited atomic
Make the nWaiting and nWaited counters atomic, and get rid of the
mutex which used to protect them.

Change-Id: I0c4d8f1df1860baa2bb189ea77bf20ee9f2066f7
Reviewed-on: http://gerrit.openafs.org/2860
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-09-30 06:09:35 -07:00
Simon Wilkinson
a3c7d9ee03 rx: Add rx_NewThreadId function
The fileserver and the fsync server were locking an internal RX
mutex, and incrementing an internal counter in order to obtain fake
pthread thread IDs. Instead of letting them muck around in the
internals of RX, provide an API that can be called to obtain a
ThreadId counter, and use that API throughout the code.

Change-Id: I68f41d1486cdafeb757da2c0df899ae1ca2b2bfc
Reviewed-on: http://gerrit.openafs.org/2859
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-09-30 06:09:22 -07:00
Simon Wilkinson
513d6a3e35 rx: Add atomic operations code
Add support for an atomic type, and atomic operators for RX. This
builds on work which has already been done for Windows, where
InterlockedOperations are used for statistics gathering.

A new opaque type, rx_atomic_t is introduced so that normal arithmetic
operations will fail on atomic data.

An implementation using native atomic methods is provided for Darwin,
Solaris and Windows. A native kernel implementation is used for Linux.
Where OpenAFS is built with a sufficiently modern gcc, gcc's atomic
primitives will be used. Sadly, gcc's builtin operations are not
available for i386, they will only be used with builds the set
-march=i486 (or later).

Otherwise, we fall back to a single mutex which protects all atomic
operations.

Change-Id: I5f69677a80617e3936f82b177cd58250a6dbf31f
Reviewed-on: http://gerrit.openafs.org/2858
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-09-30 06:07:04 -07:00
Asanka Herath
e9fafac6cb Windows: Set NTDDI_VERSION when setting _WIN32_WINNT
Change-Id: I65312c35b40dbbb4ea8f0170ea8e961bd93359aa
Reviewed-on: http://gerrit.openafs.org/2866
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-09-30 05:02:48 -07:00
Simon Wilkinson
cbaef55397 RX: Tidy reader data locking
Data which is accessed only by the reader thread doesn't need to be
protected by call->lock

Remove the call->lock protection where it isn't required, which makes
certain read/write calls lock free.

Stop rx_ResetCall from manipulating reader thread data. This data will
be zero'd and cleared when the reader thread calls rx_EndCall, and
doesn't need to be reset by the Listener thread.

The change which made rx_ResetCall reset reader thread information
was originally part of 559ea99b. It caused race conditions that were
fixed by adding additional lock protection in d0cc6e, 4dadd2 and
423ab97e. This commit reverts portions of all of those changes. It
is safe to not clear the iovc in ResetCall because any NewCall must
be balanced by a corresponding EndCall in the reader thread, and
EndCall does the appropriate freeing of reader elements.

Change-Id: I450469a4591fbe4af34482a2b219708795c57e8e
Reviewed-on: http://gerrit.openafs.org/2856
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2010-09-28 20:01:49 -07:00
Ben Kaduk
791b7a4c66 More FBSD syscall tweaking
We're now properly registered in syscalls.master for HEAD
(i.e. proto-9.0) and RELENG_8 (proto-8.2), which means that
afs3_syscall is prototyped in sys/sysproto.h .  Accordingly,
don't declare it in afs_prototypes.h for those cases.

Also add FBSD82_ENV checks for the new syscall-registration code,
and cast afs3_syscall to sy_call_t* for the sysent structure.

Change-Id: I0e7427274b018043c3a6a8ca6181a78a385d9aa2
Reviewed-on: http://gerrit.openafs.org/2864
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-09-28 20:01:31 -07:00
Simon Wilkinson
50920c0384 rx: Limit window size to max acks
The RX ack packet can only acknowledge 255 packets at once. In the
current implementation, this limits our maximum window size to 255,
as we can't acknowledge any packets we receive outside of that window
size.

Change-Id: If12eeb4a71cdf0bcd2a82f86b416e387543b7ea8
Reviewed-on: http://gerrit.openafs.org/2857
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-09-27 16:07:19 -07:00
Marc Dionne
0cac17105b volser: Set but not used variables
Fix instances of variables defined and set but never used in the
volser directory.

Spotted by gcc 4.6

Change-Id: Ibb1896cdde51985d1c14b563f8a6de6cec90403f
Reviewed-on: http://gerrit.openafs.org/2852
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-27 08:21:55 -07:00
Derrick Brashear
9d790e18fa pam test should return an int in main
change things so we conform with the usual prototype for main()

Change-Id: Ia3bfe6bb1b135fdba53ccca1650b0b7223108a27
Reviewed-on: http://gerrit.openafs.org/2850
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-27 08:21:39 -07:00
Marc Dionne
a2de10a170 viced, tviced: Set but not used variables
Remove or ifdef out some variables that are set but never used.

Spotted by gcc 4.6

Change-Id: I895740680997cff29d96ee5257830531c71711af
Reviewed-on: http://gerrit.openafs.org/2853
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-09-27 08:21:21 -07:00
Marc Dionne
e6c9cf2466 tubik: minor Makefile cleanups
Rework the install targets for udebug to avoid warnings in the case
where afssrvbindir = bindir

Remove commented out compile line for udebug

Change-Id: I500ba2575e7d71114dbdec704d6b3d22585cfdd3
Reviewed-on: http://gerrit.openafs.org/2851
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-09-27 08:21:08 -07:00
Simon Wilkinson
e23f3ae22f rxperf: Really set UDP buffer size
On Unix, the UDP buffer size has to be set before we open any sockets.
Otherwise, the default (64k) buffer size is used and never changed.

Move the calls to SetUdpBufSize in rxperf.c so that the -u command
line option actually has an effect.

Change-Id: Ic925faabca8264c0359693e97c2ab5b637902797
Reviewed-on: http://gerrit.openafs.org/2855
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-09-27 07:40:26 -07:00
Simon Wilkinson
8c04986993 Fix rxperf so that it works with pthreads
*) Don't allocate 512K on the stack
*) Don't pass stack allocated data into pthread_create()

Change-Id: I6a4f70121871bf3b7a62d9ed893a2d15bffc7a21
Reviewed-on: http://gerrit.openafs.org/2854
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-09-27 07:40:17 -07:00
Russ Allbery
7d272f0505 Update Debian packaging to 1.5.77-2 release
Contains DKMS robustness fixes, improvements to the defaults for the
module build, and cleanup of the openafs-client init script.  Updates
the build system for the new demand-attach binary naming and for the
changes to supported configure options.  Fixes some issues with
afs-newcell.  Forces disabling of the Linux syscall probing in kernel
module builds, since no supported Debian kernel allows this and it
causes problems.  Update debhelper to V8, which allows simplification
of debian/rules and debian/module/rules.

Change-Id: I4db4df873607129548557389f08c7ec1480e7204
Reviewed-on: http://gerrit.openafs.org/2849
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-25 19:02:37 -07:00
Michael Meffie
e28bb036b8 scout: display fetch and store counts as unsigned
Fetches and stores are already defined as unsigned, so format
them as unsigned values when displaying in scout. This fixes
the bug where scout shows those counts as negative values on
busy servers which have been running for a while.

Change-Id: I460172720d76e081ede4381b2718f75386af4285
Reviewed-on: http://gerrit.openafs.org/2843
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-09-24 06:49:08 -07:00
Simon Wilkinson
a99e616d44 rx: Big windows make us sad
The commit which took our Window size to 128 caused rxperf to run
40 times slower than before. All of the recent rx improvements have
reduced this to being around 2x slower than before, but we're still
not ready for large window sizes.

As 1.6 is nearing release, reset back to the old, fast, window size
of 32. We can revist this as further performance improvements and
restructuring happen on master.

Change-Id: Ic1de2cf33f42edaf1455b72580110d56fe968a7b
Reviewed-on: http://gerrit.openafs.org/2844
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-09-24 06:46:16 -07:00
Simon Wilkinson
4884de5bc8 libafsrpc depends on rxstat and fsint
... in the same way as shlibafsrpc

Change-Id: I02d8c35efadd9c9b865bb91eabd0e5b3c10a115e
Reviewed-on: http://gerrit.openafs.org/2842
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-09-24 06:45:37 -07:00
Matt Smith
18b932f29f Updates to the Cache Manager to include NetBSD5 support
LKM currently builds and will mount when forced with the entry point
manually defined. Contents of /afs can be discovered, but when listing
the directory, the system call will not return.

Change-Id: I68ba1897b56613bd4ebbe331eea3140c6a963a7d
Reviewed-on: http://gerrit.openafs.org/2767
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-23 02:46:52 -07:00
Simon Wilkinson
c21c90515a rxperf: Add build rules to build a pthreaded version
The pthreaded version of rxperf is much more interesting than the
LWP one now, so add some rules so that Unix can play with it too.

Change-Id: Ia76dd89482c8d62805ed8dfd58a1963e4bf8cc65
Reviewed-on: http://gerrit.openafs.org/2841
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-23 02:45:11 -07:00
Simon Wilkinson
c873778347 rxperf: Fix the Unix build again
Fix the Unix build of rxperf again

Change-Id: I2c5d43f6f69ef36d703bd73154a1f5ec080a47cd
Reviewed-on: http://gerrit.openafs.org/2840
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-23 02:44:50 -07:00
Simon Wilkinson
8dd5e7a87e Add an LWP version of the hcrypto library
hcrypto uses a single pthread mutex, which is only required when
we're running in a pthreaded world (in a cooperative threading world
such as LWP, there's no way that two processes can both access the
Fortuna PRNG at the same time)

So, build an LWP version of hcrypto which just disables the mutexes.

Change-Id: I0b894cfa0d16ba6d16544a4d725191c965ac6e50
Reviewed-on: http://gerrit.openafs.org/2833
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-23 02:35:19 -07:00
Simon Wilkinson
289461450c Move des/stats.h to rxkad directory
The structures defined in des/stats.h are rxkad specific, and so
should be handled by an rxkad header file, rather than by something
in the eventually-to-be-removed DES directory.

The structure shouldn't be initialised in libutil. Move initialisation
to rxkad_common, where it is already initialised in the pthread case.

Change-Id: I3de49cfe1752eaa5f273796516e2ff6c289d9533
Reviewed-on: http://gerrit.openafs.org/2576
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-09-23 02:33:59 -07:00
Simon Wilkinson
259cca4050 tests: Fix objdir builds
Fix the tests so that they work when we have a separate build
directory.

Change-Id: I1329a4186b126c84f611c9751fd228b80c80c82c
Reviewed-on: http://gerrit.openafs.org/2828
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-23 02:32:01 -07:00
Simon Wilkinson
f3f108f4c7 rx: Add struct rx_identity
Add the rx_identity structure which can be used by rx security
layers to store and return identity information to applications.

A number of helper functions for manipulating rx_identity structures
are also provided.

Change-Id: I64ae2b62a4bc8a401c1ac877f4662c66a39247f8
Reviewed-on: http://gerrit.openafs.org/2827
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-23 02:29:59 -07:00
Simon Wilkinson
571aac176e rx: Add an opaque type
Add a type to RX to hold counted data chunks, and some helper
functions to assist callers with using that type.

Change-Id: Ia81ceea50e43f6fba101122a085f84776dbf3807
Reviewed-on: http://gerrit.openafs.org/2826
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-23 02:27:58 -07:00
Russ Allbery
68d074d8aa Link dafssync-debug(8) to fssync-debug(8)
The two commands are documented identically for right now, so just link
the dafssync-debug man page to the fssync-debug man page.  Remove the
incorrect statement in the man page that fssync-debug only works with
demand-attach.

FIXES 128166

Change-Id: I812641ad7a345c7f5412c3c97ed1ba393e981639
Reviewed-on: http://gerrit.openafs.org/2836
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-23 02:22:44 -07:00
Russ Allbery
10281b5be2 Fix POD errors in fileserver and dasalvager
Fix missing newlines before =back commands.

Change-Id: If8e65c94f48c271c37c1b4bbec1b17d383c8375d
Reviewed-on: http://gerrit.openafs.org/2831
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-23 02:21:51 -07:00
Russ Allbery
82b7327b5b Update bos create man page for new naming of demand-attach binaries
The demand-attach fileserver binaries now have a "da" prefix.  Adjust
the documentation in the man page for bos create accordingly, and add
the new binaries to SEE ALSO.

Change-Id: Ib70bad87aaf8bfc483ffbfe402db01c178e6c4e4
Reviewed-on: http://gerrit.openafs.org/2830
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-23 02:19:00 -07:00
Simon Wilkinson
dd8c28a58e auth: Add documentation for ktc_ListTokensEx
Document ktc_ListTokensEx, and add a stub implementation of the
function for Windows.

Change-Id: Ie168081f1a991fcf13358a5a1eeb8d0b96f5800a
Reviewed-on: http://gerrit.openafs.org/2825
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-23 02:12:12 -07:00
Simon Wilkinson
f73c085755 hcrypto: Add dirfd definition for solaris
Add an implementation of dirfd to our local roken implementation for
platforms that don't have one.

Code taken from Heimdal.

Change-Id: I4284c18430b6f49200886f5340191a14dcf34b57
Reviewed-on: http://gerrit.openafs.org/2608
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-23 02:11:15 -07:00
Jeffrey Altman
9a6dca0707 Additional functionality for rxperf
Add the ability to initiate multiple pthread threads issuing
calls on the same connection to the server.

Add ability to set max window size.

Add ability to adjust min peer timeout.

Change-Id: I896650b033ae0adfa42d3e5831ff799ca1331bd5
Reviewed-on: http://gerrit.openafs.org/2835
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-23 02:09:40 -07:00
Simon Wilkinson
200a9947f5 libuafs: Don't #define user
libuafs used to #define user to usr_user, so that any references to
'struct user' would become 'struct usr_user'. However, none of the
kernel code uses struct user, and this #define conflicts with the
definitions in sys/user.h on Linux.

So, just remove it.

Thanks to Russ Allbery for the original problem report.

Change-Id: I7868c8ddade2df626f5ecae597144641dfc551b7
Reviewed-on: http://gerrit.openafs.org/2838
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-23 02:05:08 -07:00
Simon Wilkinson
d17adc3002 rxkad: Make the test suite build again
Make the rxkad stress test suite build again.

Change-Id: I8ff7aecb768f0f46129f612e8bcbef20d59c8886
Reviewed-on: http://gerrit.openafs.org/2832
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-23 02:04:56 -07:00
Simon Wilkinson
a10f644fd2 rxperf: Fix so it builds on Unix
Fix assorted errors in the rxperf utility so that it will build
on Unix.

Change-Id: I8ba4e5e6bc2bab38b38f27f5fae3138a0924caa6
Reviewed-on: http://gerrit.openafs.org/2834
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-09-22 14:07:08 -07:00
Simon Wilkinson
5fd720ce7d rxgen: Handle complex structures
Servers built using rxgen will break if they take complex
structures as RPC arguments. A complex structure, in this case, is
one which contains an array.

For example an RPC which takes as an argument:

struct MyData {
    opaque somebytes<>;
}

... will cause memory corruption on the server whenever it is called.

This is becase the server stubs emitted by rxgen do not zero out the
contents of the MyData structure, leaving it with whatever garbage may
be on the stack. When XDR comes to populate the somebytes opaque
array, it sees that MyData.somebytes.somebytes_val is non-zero, and
assumes that this is a pre-allocated block into which it can record
the data from the wire. However, it's really just stack garbage, and
so we overwrite memory.

As a fix, this patch creates a new list of 'complex' structures, which
are identified as structures which contain arrays. When a server stub
is created for a function that takes a complex structure, the structure
is set to zero before use, and marked to be freed afterwards.

I suspect that there may be a wider class of complex structures than are
caught by this routine, but this is a start...

Change-Id: Id671fe602c8cd44afaaccc821aaa097b142f1899
Reviewed-on: http://gerrit.openafs.org/2736
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-09-21 05:12:11 -07:00
Jeffrey Altman
c77f2f1369 Rx: Change minimum peer timeout to 2ms
The previous value, 350ms, is historical.  Now that networks are
so much faster, an artificially high timeout value when backed off
results in an extremely long delay before communication can resume.

Change-Id: I6207fb3e5c26a36704abc1f9210af53e0ff1fae6
Reviewed-on: http://gerrit.openafs.org/2815
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-09-20 22:16:56 -07:00
Jeffrey Altman
ed25a92023 Rx: Permit MakeDebugCall() be be compiled when RXDEBUG is undefined
If MAKEDEBUGCALL is defined, build MakeDebugCall() even if RXDEBUG
is not defined.

Change-Id: I98d3216e8bf1e1f3b6b62c962d33db316d0f51ac
Reviewed-on: http://gerrit.openafs.org/2818
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-09-20 22:07:22 -07:00
Jeffrey Altman
e197c19ced Rx: Do not hold call lock across memcpy in rx_ReadProc/rx_WriteProc
1.4.x does not hold the call lock across memcpy operations in
rx_ReadProc, rx_ReadProc32, rx_WriteProc, rx_WriteProc32.  The
claim is that the call curpos, curlen, and nLeft fields which
refer to the current packet being processed will not be touched
by any other thread.  Therefore it is safe to drop the call lock
to permit another thread to add packets to the call while the memcpy
is performed in parallel.

This patchset continues to hold the call lock longer than the
original implementation but does drop it for the length of time
it takes to copy data from the packet buffer to the application
buffer.

Change-Id: I87dacdf541ba50db80ab55e500b38edab5126dc2
Reviewed-on: http://gerrit.openafs.org/2817
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-20 22:07:04 -07:00
Jeffrey Altman
7b96076398 Rx: Permit udp buffer size to be set in rxperf
Change-Id: I4680e038e2965ca8bc13f76955b85e924435c6af
Reviewed-on: http://gerrit.openafs.org/2816
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-20 22:04:42 -07:00
Russ Allbery
0a9e57c45e Add NEWS entries for OpenAFS 1.5.77 and 1.5.76
Based on the public announcement for 1.5.77.

Change-Id: Ic368e16e16b03a79de6196a2e355eca0f420de77
Reviewed-on: http://gerrit.openafs.org/2819
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-20 22:04:16 -07:00
Jeffrey Altman
a00da7d2c9 Windows: Negative Caching for Volume Lookups
If a volume lookup returns VL_NOENT or VL_BADNAME, cache the negative
response for five minutes.  This prevents volume lookup storms caused
by the same volume lookup being performed repeated during a short
time period.  This can happen if mount points to volumes that do not
exist are present in a directory that is being evaluated by Windows
Explorer or Common Control File Dialogs.

This functionality is implemented by storing the most recent update
time for the volume group as part of the cm_volume_t.  A non-existing
volume group is identified with a new CM_VOLUMEFLAG_NOEXIST flag.
The presence of the lastUpdateTime value also permits volume location
information to expire at lastUpdateTime + lifetime instead of expiring
all volume information simultaneously each lifetime period.

LICENSE MIT

Change-Id: I01c5122a153fadc3824ff916655b0199d5c1de3c
Reviewed-on: http://gerrit.openafs.org/2771
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-09-20 21:06:50 -07:00
Russ Allbery
089cd2c103 Mention KRB5CCNAME in the aklog man page
AFS users not otherwise familiar with Kerberos may not realize that
one sets KRB5CCNAME to use an alternative ticket cache.  Mention the
variable in the aklog man page, although defer to the Kerberos
documentation for most details.

Change-Id: I13133285f153f86e0aa1e95b24715e01d576075d
Reviewed-on: http://gerrit.openafs.org/2761
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Russ Allbery <rra@stanford.edu>
2010-09-20 14:10:08 -07:00
Jeffrey Altman
be91260047 Rx: Permit ADAPT_WINDOW code to build
Add missing fields to rx data structures.

Update variable references.

Change-Id: I7f3cc5e89e71ee0a9dfc3ae8b021bec07a41ce95
Reviewed-on: http://gerrit.openafs.org/2783
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-20 02:03:44 -07:00
Jeffrey Altman
7ee80a853c Windows: Export additional RX debugging variables from afsrpc.dll
Export

   rxi_nRecvFrags                          @2008 DATA
   rxi_nSendFrags                          @2009 DATA
   rx_initReceiveWindow                    @2010 DATA
   rx_initSendWindow                       @2011 DATA
   rx_intentionallyDroppedPacketsPer100    @2012 DATA
   rx_intentionallyDroppedOnReadPer100     @2013 DATA

so they can be referenced from pthreaded builds of src/rx/test tools.
Exported variables must be present in both FREE and CHECKED builds.

Change-Id: Ia7f3ee0143679bab1ce74f71dc3a996cda1f18a8
Reviewed-on: http://gerrit.openafs.org/2779
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-20 02:00:11 -07:00
Jeffrey Altman
f1183f1628 Rx: PrintTheseStats should not be dependent on RXDEBUG
When RXDEBUG is not defined, PrintTheseStats generates an error
even though the statistics are in fact available.  The global
variable rx_packetTypes was not being defined without RXDEBUG.

Make rx_packetTypes defined always and permit statistics to
always be printed.

Change-Id: Ife708d34b5d56374c8aff9aa7c941d39b37ca4a1
Reviewed-on: http://gerrit.openafs.org/2778
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-20 01:59:40 -07:00
Jeffrey Altman
00afdbed0f Rx: move TSFPQ prototypes from rx_globals.h to rx_protoypes.h
Function prototypes belong in rx_prototypes.h not in rx_globals.h.

Remove EXT macro from function prototypes as functions do not
require special treatment in order to be exported by a DLL on Windows.

Change-Id: Ieb617db634f2cfa57410e77e276c703311304547
Reviewed-on: http://gerrit.openafs.org/2777
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-20 01:59:18 -07:00
Jeffrey Altman
8549ebe0a8 Rx: properly compute dataPacketsReSent statistic
The global dataPacketsReSent statistic should be the sum of all
peer->reSends and dataPacketsSent should not include the count of
resent packets.  Prior to this patchset, dataPacketsSent included
the resent packets and dataPacketsReSent was computed as the number
of requests for Ack instead of the number of packets resent.

Change-Id: I969003f7ec1805d09c14ac342453f86fdb5df99a
Reviewed-on: http://gerrit.openafs.org/2776
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-20 01:58:53 -07:00