From owner-svn-src-head@FreeBSD.ORG Wed Oct 31 17:12:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 940194B4; Wed, 31 Oct 2012 17:12:13 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B89D8FC14; Wed, 31 Oct 2012 17:12:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9VHCD0g090320; Wed, 31 Oct 2012 17:12:13 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9VHCDZI090317; Wed, 31 Oct 2012 17:12:13 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201210311712.q9VHCDZI090317@svn.freebsd.org> From: Jim Harris Date: Wed, 31 Oct 2012 17:12:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242401 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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: Wed, 31 Oct 2012 17:12:13 -0000 Author: jimharris Date: Wed Oct 31 17:12:12 2012 New Revision: 242401 URL: http://svn.freebsd.org/changeset/base/242401 Log: Pad and align the callout_cpu mtx to its own cacheline to reduce false sharing especially on the default CPU 0 callout_cpu structure. This will be followed up by attilio@ with a conversion to the new struct mtx_padalign but doing this manual conversion first gives an easy MFC candidate since mtx_padalign is a more extensive system change. Sponsored by: Intel Reviewed by: jeff, attilio MFC after: 1 week Modified: head/sys/kern/kern_timeout.c Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Wed Oct 31 17:01:56 2012 (r242400) +++ head/sys/kern/kern_timeout.c Wed Oct 31 17:12:12 2012 (r242401) @@ -119,8 +119,8 @@ struct cc_mig_ent { * when the callout should be served. */ struct callout_cpu { - struct cc_mig_ent cc_migrating_entity; struct mtx cc_lock; + struct cc_mig_ent cc_migrating_entity __aligned(CACHE_LINE_SIZE); struct callout *cc_callout; struct callout_tailq *cc_callwheel; struct callout_list cc_callfree;