From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: [PATCHv2 5/5] evtchn: pad struct evtchn to 64 bytes Date: Mon, 15 Jun 2015 16:48:19 +0100 Message-ID: <1434383299-21833-6-git-send-email-david.vrabel@citrix.com> References: <1434383299-21833-1-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z4XOs-0008WH-SV for xen-devel@lists.xenproject.org; Mon, 15 Jun 2015 16:38:18 +0000 In-Reply-To: <1434383299-21833-1-git-send-email-david.vrabel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Keir Fraser , Tim Deegan , David Vrabel , Jan Beulich , Ian Campbell List-Id: xen-devel@lists.xenproject.org The number of struct evtchn in a page must be a power of two. Under some workloads performance is improved slightly by padding struct evtchn to 64 bytes (a cache line), thus putting the per-channel locks into their own cache line. This does not decrease the number of struct evtchn's per-page. Signed-off-by: David Vrabel --- I'm not sure we actually want to do this. I think it would be better to pack the struct evtchn and use vmap to turn the pages into a linear array for quicker lookup. --- xen/include/xen/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index 44ea92d..a0ff9d2 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -129,7 +129,7 @@ struct evtchn #endif } ssid; #endif -}; +} __attribute__((aligned(64))); int evtchn_init(struct domain *d); /* from domain_create */ void evtchn_destroy(struct domain *d); /* from domain_kill */ -- 1.7.10.4