[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-aio
Subject:    [PATCH 19/25] aio: Give shared kioctx fields their own cachelines
From:       Kent Overstreet <koverstreet () google ! com>
Date:       2012-11-28 16:43:43
Message-ID: 1354121029-1376-20-git-send-email-koverstreet () google ! com
[Download RAW message or body]

Signed-off-by: Kent Overstreet <koverstreet@google.com>
---
 fs/aio.c | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/fs/aio.c b/fs/aio.c
index 1ff4d3b..7dee3aa 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -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 */
@@ -86,6 +79,15 @@ struct kioctx {
 	long			nr_pages;
 
 	struct {
+		atomic_t	reqs_active;
+	} ____cacheline_aligned;
+
+	struct {
+		spinlock_t	ctx_lock;
+		struct list_head active_reqs;	/* used for cancellation */
+	} ____cacheline_aligned;
+
+	struct {
 		struct mutex	ring_lock;
 	} ____cacheline_aligned;
 
@@ -94,6 +96,10 @@ struct kioctx {
 		spinlock_t	completion_lock;
 	} ____cacheline_aligned;
 
+	struct {
+		wait_queue_head_t wait;
+	} ____cacheline_aligned;
+
 	struct page		*internal_pages[AIO_RING_PAGES];
 
 };
-- 
1.7.12

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic