Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

aio: give shared kioctx fields their own cachelines

[akpm@linux-foundation.org: make reqs_active __cacheline_aligned_in_smp]
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>
Reviewed-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Kent Overstreet and committed by
Linus Torvalds
4e23bcae 58c85dc2

+15 -12
+15 -12
fs/aio.c
··· 67 67 unsigned long user_id; 68 68 struct hlist_node list; 69 69 70 - wait_queue_head_t wait; 71 - 72 - spinlock_t ctx_lock; 73 - 74 - atomic_t reqs_active; 75 - struct list_head active_reqs; /* used for cancellation */ 76 - 77 70 /* 78 71 * This is what userspace passed to io_setup(), it's not used for 79 72 * anything but counting against the global max_reqs quota. ··· 85 92 struct page **ring_pages; 86 93 long nr_pages; 87 94 95 + struct rcu_head rcu_head; 96 + struct work_struct rcu_work; 97 + 98 + struct { 99 + atomic_t reqs_active; 100 + } ____cacheline_aligned_in_smp; 101 + 102 + struct { 103 + spinlock_t ctx_lock; 104 + struct list_head active_reqs; /* used for cancellation */ 105 + } ____cacheline_aligned_in_smp; 106 + 88 107 struct { 89 108 struct mutex ring_lock; 90 - } ____cacheline_aligned; 109 + wait_queue_head_t wait; 110 + } ____cacheline_aligned_in_smp; 91 111 92 112 struct { 93 113 unsigned tail; 94 114 spinlock_t completion_lock; 95 - } ____cacheline_aligned; 115 + } ____cacheline_aligned_in_smp; 96 116 97 117 struct page *internal_pages[AIO_RING_PAGES]; 98 - 99 - struct rcu_head rcu_head; 100 - struct work_struct rcu_work; 101 118 }; 102 119 103 120 /*------ sysctl variables----*/