From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 31 10:19:27 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F098616A421 for ; Mon, 31 Dec 2007 10:19:27 +0000 (UTC) (envelope-from oceanare@pacific.net.sg) Received: from smtpgate2.pacific.net.sg (smtpgate2.pacific.net.sg [203.120.90.32]) by mx1.freebsd.org (Postfix) with SMTP id 2678913C46E for ; Mon, 31 Dec 2007 10:19:26 +0000 (UTC) (envelope-from oceanare@pacific.net.sg) Received: (qmail 23771 invoked from network); 31 Dec 2007 10:19:24 -0000 Received: from adsl54.dyn112.pacific.net.sg (HELO P2120.somewherefaraway.com) (oceanare@210.24.112.54) by smtpgate2.pacific.net.sg with ESMTPA; 31 Dec 2007 10:19:23 -0000 Message-ID: <4778B8A3.8040400@pacific.net.sg> Date: Mon, 31 Dec 2007 17:38:43 +0800 From: Erich Dollansky User-Agent: Thunderbird 2.0.0.6 (X11/20070826) MIME-Version: 1.0 To: Kostik Belousov References: <47760132.5040306@pacific.net.sg> <20071229111204.GX57756@deviant.kiev.zoral.com.ua> <20071230131056.GG57756@deviant.kiev.zoral.com.ua> In-Reply-To: <20071230131056.GG57756@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Kip Macy , Ivan Voras , freebsd-hackers@freebsd.org Subject: Re: Architectures with strict alignment? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2007 10:19:28 -0000 Hi, Kostik Belousov wrote: > On Sat, Dec 29, 2007 at 01:12:04PM +0200, Kostik Belousov wrote: >> On Sat, Dec 29, 2007 at 12:14:11AM -0800, Kip Macy wrote: > > I.e., it seems that gcc does not feel too guilty generating unaligned > half-word writes on i386. :( this should not be a problem inside a cache line. If the access goes accross two cache lines and the other cache line is not in the cache, it becomes real difficult. I can't tell you what the hardware actually does in this case. It should read the second affected cache line into the cache. But what happens if the second affected cache line is blocked by another CPU while the current CPU blocks the first cache line? Erich