• Octavian Purdila's avatar
    llc: convert the socket list to RCU locking · b76f5a84
    Octavian Purdila authored
    For the reclamation phase we use the SLAB_DESTROY_BY_RCU mechanism,
    which require some extra checks in the lookup code:
    
    a) If the current socket was released, reallocated & inserted in
    another list it will short circuit the iteration for the current list,
    thus we need to restart the lookup.
    
    b) If the current socket was released, reallocated & inserted in the
    same list we just need to recheck it matches the look-up criteria and
    if not we can skip to the next element.
    
    In this case there is no need to restart the lookup, since sockets are
    inserted at the start of the list and the worst that will happen is
    that we will iterate throught some of the list elements more then
    once.
    
    Note that the /proc and multicast delivery was not yet converted to
    RCU, it still uses spinlocks for protection.
    Signed-off-by: default avatarOctavian Purdila <opurdila@ixiacom.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    b76f5a84
llc_proc.c 6.29 KB