OpenAFS Master Repository branch, openafs-stable-1_6_x, updated. openafs-stable-1_6_6-61-g03a9b48
Gerrit Code Review
gerrit@openafs.org
Thu, 20 Mar 2014 10:54:20 -0700 (PDT)
The following commit has been merged in the openafs-stable-1_6_x branch:
commit 03a9b481c7f27c462c9d65a756d172e79758b86d
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Apr 4 17:35:01 2013 -0500
viced: Avoid issuing redundant TMAY requests
Currently, if a new Rx connection comes in from a host we already have
a host struct for, we make a TellMeAboutYourself (TMAY) call to the
given host, to verify the UUID (and caps, interface info, etc) is what
we expect it to be. That is, if it's still the "same" host that we
know about. This is necessary because we otherwise have no way of
telling if the Rx connection is from the same host, or from a new host
that just happens to have the same IP address (e.g. in the case that
hosts are moving around and changing IPs). We do this while the host
is locked, so we only issue these TMAY calls one at a time.
If a large number of Rx connections come in from the same host at
around the same time, this can result in a lot of TMAY requests being
issued against the host, even for hosts that never change IPs and
never do anything strange. In these situations, issuing so many TMAYs
is useless. If we have several calls waiting to lock the host to issue
a TMAY, some of the extra TMAY calls are provably useless. So instead
of calling TMAY repeatedly, remember what the last successful TMAY
result was, and reuse it for the "provably useless" calls.
Note that this 'cache' stores the actual raw results of
TellMeAboutYourself. We could save some memory by storing just how we
interpret that data later on in h_GetHost_r, but this way results in
way simpler h_GetHost_r logic. Since, we can use the same code paths
as for a "real" TMAY call.
Reviewed-on: http://gerrit.openafs.org/9711
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 9a0a8ca4d186cf953b87d9fae1a35f66090b060c)
Change-Id: I0f0e6a4a1a56ea7992194cbabebf5f793a74f37a
Reviewed-on: http://gerrit.openafs.org/10759
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/viced/host.c | 243 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
src/viced/host.h | 6 ++
2 files changed, 245 insertions(+), 4 deletions(-)
--
OpenAFS Master Repository