• Chuck Lever's avatar
    SUNRPC: Optimize xdr_reserve_space() · 62ed448c
    Chuck Lever authored
    
    
    Transitioning between encode buffers is quite infrequent. It happens
    about 1 time in 400 calls to xdr_reserve_space(), measured on NFSD
    with a typical build/test workload.
    
    Force the compiler to remove that code from xdr_reserve_space(),
    which is a hot path on both the server and the client. This change
    reduces the size of xdr_reserve_space() from 10 cache lines to 2
    when compiled with -Os.
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    Reviewed-by: default avatarJ. Bruce Fields <bfields@fieldses.org>
    62ed448c
xdr.c 55.2 KB