From owner-freebsd-sparc64@FreeBSD.ORG Thu Jun 4 00:14:40 2009 Return-Path: Delivered-To: sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 641231065672; Thu, 4 Jun 2009 00:14:40 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout011.mac.com (asmtpout011.mac.com [17.148.16.86]) by mx1.freebsd.org (Postfix) with ESMTP id 494CF8FC1D; Thu, 4 Jun 2009 00:14:40 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from [172.24.105.139] (natint3.juniper.net [66.129.224.36]) by asmtp011.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KKO00BF3R8F1J70@asmtp011.mac.com>; Wed, 03 Jun 2009 16:14:40 -0700 (PDT) Message-id: <15550775-6B8A-414E-A579-8B518D62E06E@mac.com> From: Marcel Moolenaar To: Robert Watson In-reply-to: Date: Wed, 03 Jun 2009 16:14:38 -0700 References: <20090602222445.2F6017302F@freebsd-current.sentex.ca> X-Mailer: Apple Mail (2.935.3) Cc: kmacy@freebsd.org, marius@freebsd.org, FreeBSD Tinderbox , sparc64@freebsd.org, Eygene Ryabinkin , current@freebsd.org Subject: Re: [head tinderbox] failure on sparc64/sun4v X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2009 00:14:41 -0000 On Jun 3, 2009, at 1:06 PM, Robert Watson wrote: > > Is there a reason not just to use __aligned(64) or the like on the > first entry of the MD PCPU structure for sun4v to avoid future MI > pcpu changes from causing similar discomfort for the MD pcpu parts? > Also, do we know why these alignment/sizing requirements exist for > struct pcpu on sun4v but not other platforms? If this is about > packing pcpu structures into properly aligned cache lines, again > __aligned() might be the right approach to take... Adding __aligned(xx) doesn't make it aligned. For example, malloc(3) only aligns at 16-byte boundaries, so any user-space structure that has __aligned(x>16) must manually make sure that this is actually the case by over-allocating and then adjusting the pointer to an x>16 aligned address. Likewise for the kernel, though it's easier in the kernel to get something that's page-aligned... FYI, -- Marcel Moolenaar xcllnt@mac.com