From owner-svn-src-head@FreeBSD.ORG Mon Mar 22 22:39:33 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0280E106564A; Mon, 22 Mar 2010 22:39:33 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6BEB8FC0C; Mon, 22 Mar 2010 22:39:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2MMdWAo061586; Mon, 22 Mar 2010 22:39:32 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2MMdWZi061585; Mon, 22 Mar 2010 22:39:32 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <201003222239.o2MMdWZi061585@svn.freebsd.org> From: Kip Macy Date: Mon, 22 Mar 2010 22:39:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205487 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2010 22:39:33 -0000 Author: kmacy Date: Mon Mar 22 22:39:32 2010 New Revision: 205487 URL: http://svn.freebsd.org/changeset/base/205487 Log: - enable alignment on amd64 only - only align pcpu caches and the volatile portion of uma_zone Modified: head/sys/vm/uma_int.h Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Mon Mar 22 22:12:27 2010 (r205486) +++ head/sys/vm/uma_int.h Mon Mar 22 22:39:32 2010 (r205487) @@ -162,7 +162,11 @@ struct uma_hash { /* * align field or structure to cache line */ +#if defined(__amd64__) +#define UMA_ALIGN __aligned(CACHE_LINE_SIZE) +#else #define UMA_ALIGN +#endif /* * Structures for per cpu queues. @@ -173,7 +177,7 @@ struct uma_bucket { int16_t ub_cnt; /* Count of free items. */ int16_t ub_entries; /* Max items. */ void *ub_bucket[]; /* actual allocation storage */ -} UMA_ALIGN; +}; typedef struct uma_bucket * uma_bucket_t; @@ -330,7 +334,7 @@ struct uma_zone { * This HAS to be the last item because we adjust the zone size * based on NCPU and then allocate the space for the zones. */ - struct uma_cache uz_cpu[1] UMA_ALIGN; /* Per cpu caches */ + struct uma_cache uz_cpu[1]; /* Per cpu caches */ }; /*