From owner-svn-src-user@FreeBSD.ORG Mon Jun 8 06:12:47 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90CDE1065673; Mon, 8 Jun 2009 06:12:47 +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 7F67E8FC17; Mon, 8 Jun 2009 06:12:47 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n586ClXX018011; Mon, 8 Jun 2009 06:12:47 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n586Clq6018010; Mon, 8 Jun 2009 06:12:47 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200906080612.n586Clq6018010@svn.freebsd.org> From: Kip Macy Date: Mon, 8 Jun 2009 06:12:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193690 - user/kmacy/releng_7_2_fcs/sys/vm X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 06:12:47 -0000 Author: kmacy Date: Mon Jun 8 06:12:47 2009 New Revision: 193690 URL: http://svn.freebsd.org/changeset/base/193690 Log: avoid false sharing by aligning sections Modified: user/kmacy/releng_7_2_fcs/sys/vm/uma_int.h Modified: user/kmacy/releng_7_2_fcs/sys/vm/uma_int.h ============================================================================== --- user/kmacy/releng_7_2_fcs/sys/vm/uma_int.h Mon Jun 8 06:11:36 2009 (r193689) +++ user/kmacy/releng_7_2_fcs/sys/vm/uma_int.h Mon Jun 8 06:12:47 2009 (r193690) @@ -177,7 +177,7 @@ struct uma_cache { uma_bucket_t uc_allocbucket; /* Bucket to allocate from */ u_int64_t uc_allocs; /* Count of allocations */ u_int64_t uc_frees; /* Count of frees */ -}; +} __aligned(128); typedef struct uma_cache * uma_cache_t; @@ -280,11 +280,12 @@ struct uma_zone { uma_dtor uz_dtor; /* Destructor */ uma_init uz_init; /* Initializer for each item */ uma_fini uz_fini; /* Discards memory */ + /* separate uz_flags from stats keeping */ + u_int32_t uz_flags;/* Flags inherited from kegs */ - u_int64_t uz_allocs; /* Total number of allocations */ + u_int64_t uz_allocs __aligned(128); /* Total number of allocations */ u_int64_t uz_frees; /* Total number of frees */ u_int64_t uz_fails; /* Total number of alloc failures */ - u_int32_t uz_flags; /* Flags inherited from kegs */ u_int32_t uz_size; /* Size inherited from kegs */ uint16_t uz_fills; /* Outstanding bucket fills */ uint16_t uz_count; /* Highest value ub_ptr can have */ @@ -293,7 +294,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]; /* Per cpu caches */ + struct uma_cache uz_cpu[1] __aligned(128); /* Per cpu caches */ }; /*