]> git.baikalelectronics.ru Git - kernel.git/commit
fasync: RCU and fine grained locking
authorEric Dumazet <eric.dumazet@gmail.com>
Wed, 14 Apr 2010 09:55:35 +0000 (09:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Apr 2010 23:19:29 +0000 (16:19 -0700)
commitac54b8cb7eff10b4a0acdff7c67ff214acff7e2b
tree2f504e9f4d8d418dd8fb2d042b076c1318232360
parentc6bd50aee42529340cfcd40c3deb6cbea58ba0e8
fasync: RCU and fine grained locking

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: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
fs/fcntl.c
include/linux/fs.h
net/socket.c