[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCHv1 6/6] evtchn: pad struct evtchn to 64 bytes
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 <david.vrabel@xxxxxxxxxx> --- 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index 292e28f..0749c43 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -110,8 +110,8 @@ struct evtchn u8 priority; u8 last_priority; u16 last_vcpu_id; -#ifdef XSM_ENABLE union { +#ifdef XSM_ENABLE #ifdef XSM_NEED_GENERIC_EVTCHN_SSID /* * If an XSM module needs more space for its event channel context, @@ -127,8 +127,9 @@ struct evtchn */ u32 flask_sid; #endif - } ssid; #endif + u8 __pad[24]; /* Round size to power of two. */ + } ssid; }; int evtchn_init(struct domain *d); /* from domain_create */ -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |