]> git.baikalelectronics.ru Git - kernel.git/commit
aio: make the lookup_ioctx() lockless
authorJens Axboe <jens.axboe@oracle.com>
Tue, 9 Dec 2008 07:11:22 +0000 (08:11 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 29 Dec 2008 07:29:50 +0000 (08:29 +0100)
commite62cac8e06504e9bb4d63d0ead26099e12412c64
tree8334f03c598343bb93340f081fcde5ba659b440b
parent75ba9d5248f6078e723515e172a118e844aedf61
aio: make the lookup_ioctx() lockless

The mm->ioctx_list is currently protected by a reader-writer lock,
so we always grab that lock on the read side for doing ioctx
lookups. As the workload is extremely reader biased, turn this into
an rcu hlist so we can make lookup_ioctx() lockless. Get rid of
the rwlock and use a spinlock for providing update side exclusion.

There's usually only 1 entry on this list, so it doesn't make sense
to look into fancier data structures.

Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
arch/s390/mm/pgtable.c
fs/aio.c
include/linux/aio.h
include/linux/mm_types.h
kernel/fork.c