• C
    SUNRPC: Avoid spurious wake-up during UDP connect processing · fe315e76
    Chuck Lever 提交于
    To clear out old state, the UDP connect workers unconditionally invoke
    xs_close() before proceeding with a new connect.  Nowadays this causes
    a spurious wake-up of the task waiting for the connect to complete.
    
    This is a little racey, but usually harmless.  The waiting task
    immediately retries the connect via a call_bind/call_connect sequence,
    which usually finds the transport already in the connected state
    because the connect worker has finished in the background.
    
    To avoid a spurious wake-up, factor the xs_close() logic that resets
    the underlying socket into a helper, and have the UDP connect workers
    call that helper instead of xs_close().
    Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
    Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
    fe315e76
xprtsock.c 54.7 KB