OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_1-20-g002b031

Gerrit Code Review gerrit@openafs.org
Thu, 27 May 2021 01:55:17 -0400


The following commit has been merged in the master branch:
commit 002b031d01e3c0f2ad3e1069b98800c3a7228bd5
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Fri Apr 16 11:11:35 2021 -0500

    rx: Remove delays in multi_End_Ignore
    
    When using our multi_Rx mechanism, callers can use either multi_End or
    multi_End_Ignore at the end of the multi_Rx block. Among other things,
    these macros run 'rx_EndCall(call, code)' for each call in the
    multi_Rx invocation that hasn't already ended. For multi_End, 'code'
    is RX_USER_ABORT, and for multi_End_Ignore, 'code' is 0; the macros
    are otherwise equivalent.
    
    When multi_End is used, this means any un-ended calls are aborted with
    RX_USER_ABORT, and the call immediately ends. But when
    multi_End_Ignore is used, the call is not aborted, and so we must wait
    for the peer to acknowledge that it has received our packets before
    ending (done via an rxi_ReadProc call in rx_EndCall).
    
    This means that if a caller multi_Abort's out of a multi call and uses
    multi_End_Ignore, we'll wait for the peer to acknowledge our packets
    for all of the calls we haven't processed. Waiting for that is a
    complete waste of time, since we don't care about the results of those
    calls (since we multi_Abort'd). This doesn't matter much if those
    calls are responded to promptly, but if the peer is not up or is just
    slow, it can cause us to wait several seconds until we timeout.
    
    There are currently only three users of multi_End_Ignore:
    
    - DoProbe in src/ubik/recovery.c
    
    - MultiBreakCallBackAlternateAddress_r in src/viced/callback.c
    
    - MultiProbeAlternateAddress_r in src/viced/callback.c
    
    All of these use multi_Rx to try and probe multiple IPs for the same
    machine in parallel, and so some of the calls may very well be trying
    to contact unreachable IPs; we only need one to work for the call to
    succeed.
    
    To avoid the unnecessary delays in these codepaths, convert them to
    use multi_End. Change multi_End_Ignore to be the same as multi_End,
    and multi_Finalize_Ignore to the same as multi_Finalize, to make sure
    the bad behavior is not used. The _Ignore macros/functions are now
    unused in the tree, but keep them around for now since
    multi_Finalize_Ignore is exported by libafsrpc.
    
    Thanks to mbarbosa@sinenomine.net for discovering this weird behavior.
    
    Change-Id: I65536a0975bd7a16bb805555943c032c5e6afdf3
    Reviewed-on: https://gerrit.openafs.org/14595
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
    Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

 src/rx/rx_multi.c    |   15 ++-------------
 src/rx/rx_multi.h    |    6 ++----
 src/ubik/recovery.c  |    2 +-
 src/viced/callback.c |    4 ++--
 4 files changed, 7 insertions(+), 20 deletions(-)

-- 
OpenAFS Master Repository