Skip to content
  • Eric Dumazet's avatar
    fasync: RCU and fine grained locking · 989a2979
    Eric Dumazet authored
    
    
    kill_fasync() uses a central rwlock, candidate for RCU conversion, to
    avoid cache line ping pongs on SMP.
    
    fasync_remove_entry() and fasync_add_entry() can disable IRQS on a short
    section instead during whole list scan.
    
    Use a spinlock per fasync_struct to synchronize kill_fasync_rcu() and
    fasync_{remove|add}_entry(). This spinlock is IRQ safe, so sock_fasync()
    doesnt need its own implementation and can use fasync_helper(), to
    reduce code size and complexity.
    
    We can remove __kill_fasync() direct use in net/socket.c, and rename it
    to kill_fasync_rcu().
    
    Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
    Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
    Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    989a2979