Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934291Ab3CUQo0 (ORCPT ); Thu, 21 Mar 2013 12:44:26 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:41600 "EHLO mail-pd0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933907Ab3CUQoX (ORCPT ); Thu, 21 Mar 2013 12:44:23 -0400 From: Kent Overstreet To: linux-kernel@vger.kernel.org, linux-aio@kvack.org, akpm@linux-foundation.org Cc: Kent Overstreet , Zach Brown , Felipe Balbi , Greg Kroah-Hartman , Mark Fasheh , Joel Becker , Rusty Russell , Jens Axboe , Asai Thambi S P , Selvan Mani , Sam Bradshaw , Jeff Moyer , Al Viro , Benjamin LaHaise Subject: [PATCH 20/33] aio: give shared kioctx fields their own cachelines Date: Thu, 21 Mar 2013 09:35:41 -0700 Message-Id: <1363883754-27966-21-git-send-email-koverstreet@google.com> X-Mailer: git-send-email 1.8.1.3 In-Reply-To: <1363883754-27966-1-git-send-email-koverstreet@google.com> References: <1363883754-27966-1-git-send-email-koverstreet@google.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2248 Lines: 81 [akpm@linux-foundation.org: make reqs_active __cacheline_aligned_in_smp] Signed-off-by: Kent Overstreet Cc: Zach Brown Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: Mark Fasheh Cc: Joel Becker Cc: Rusty Russell Cc: Jens Axboe Cc: Asai Thambi S P Cc: Selvan Mani Cc: Sam Bradshaw Cc: Jeff Moyer Cc: Al Viro Cc: Benjamin LaHaise Signed-off-by: Andrew Morton --- fs/aio.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index 0e283ad..b71691d 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 */ - /* * This is what userspace passed to io_setup(), it's not used for * anything but counting against the global max_reqs quota. @@ -92,19 +85,29 @@ struct kioctx { struct page **ring_pages; long nr_pages; + struct rcu_head rcu_head; + struct work_struct rcu_work; + + struct { + atomic_t reqs_active; + } ____cacheline_aligned_in_smp; + + struct { + spinlock_t ctx_lock; + struct list_head active_reqs; /* used for cancellation */ + } ____cacheline_aligned_in_smp; + struct { struct mutex ring_lock; - } ____cacheline_aligned; + 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----*/ -- 1.8.1.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/