diff options
author | Kent Overstreet <koverstreet@google.com> | 2013-03-02 15:25:47 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2013-03-07 14:27:13 +1100 |
commit | bde5fe4f445447382cf08a1a010f35d285b49534 (patch) | |
tree | aef08d9c7eb5e463023f90589380517473e1761f /fs | |
parent | bcbe478b5a2c1c5831dbe1c31d4b6a7d7438ccee (diff) |
aio: give shared kioctx fields their own cachelines
Signed-off-by: Kent Overstreet <koverstreet@google.com>
Cc: Zach Brown <zab@redhat.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Asai Thambi S P <asamymuthupa@micron.com>
Cc: Selvan Mani <smani@micron.com>
Cc: Sam Bradshaw <sbradshaw@micron.com>
Cc: Jeff Moyer <jmoyer@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/aio.c | 27 |
1 files changed, 15 insertions, 12 deletions
@@ -67,13 +67,6 @@ struct kioctx { unsigned long user_id; struct hlist_node list; - wait_queue_head_t wait; - - spinlock_t ctx_lock; - - atomic_t reqs_active; - struct list_head active_reqs; /* used for cancellation */ - unsigned nr; /* sys_io_setup currently limits this to an unsigned int */ @@ -85,19 +78,29 @@ struct kioctx { struct page **ring_pages; long nr_pages; + struct rcu_head rcu_head; + struct work_struct rcu_work; + struct { - struct mutex ring_lock; + atomic_t reqs_active; } ____cacheline_aligned; struct { + spinlock_t ctx_lock; + struct list_head active_reqs; /* used for cancellation */ + } ____cacheline_aligned_in_smp; + + struct { + struct mutex ring_lock; + wait_queue_head_t wait; + } ____cacheline_aligned_in_smp; + + struct { unsigned tail; spinlock_t completion_lock; - } ____cacheline_aligned; + } ____cacheline_aligned_in_smp; struct page *internal_pages[AIO_RING_PAGES]; - - struct rcu_head rcu_head; - struct work_struct rcu_work; }; /*------ sysctl variables----*/ |