From owner-freebsd-current@FreeBSD.ORG Thu Jan 18 22:17:59 2007 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7896816A47E for ; Thu, 18 Jan 2007 22:17:59 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from mail-out3.apple.com (mail-out3.apple.com [17.254.13.22]) by mx1.freebsd.org (Postfix) with ESMTP id 4F8AD13C468 for ; Thu, 18 Jan 2007 22:17:59 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from relay7.apple.com (relay7.apple.com [17.128.113.37]) by mail-out3.apple.com (8.13.8/8.13.8) with ESMTP id l0IMHw6Q026931; Thu, 18 Jan 2007 14:17:58 -0800 (PST) Received: from relay7.apple.com (unknown [127.0.0.1]) by relay7.apple.com (Symantec Mail Security) with ESMTP id 8E07330020; Thu, 18 Jan 2007 14:17:58 -0800 (PST) X-AuditID: 11807125-a3250bb000006e4c-93-45aff2160105 Received: from [17.214.13.96] (unknown [17.214.13.96]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by relay7.apple.com (Apple SCV relay) with ESMTP id 798A230002; Thu, 18 Jan 2007 14:17:58 -0800 (PST) In-Reply-To: <45AFED63.7020009@FreeBSD.org> References: <3bbf2fe10607250813w8ff9e34pc505bf290e71758@mail.gmail.com> <3bbf2fe10607281004o6727e976h19ee7e054876f914@mail.gmail.com> <3bbf2fe10701160851r79b04464m2cbdbb7f644b22b6@mail.gmail.com> <20070116154258.568e1aaf@pleiades.nextvenue.com> <3bbf2fe10701161525j6ad9292y93502b8df0f67aa9@mail.gmail.com> <45AD6DFA.6030808@FreeBSD.org> <3bbf2fe10701161655p5e686b52n7340b3100ecfab93@mail.gmail.com> <200701172022.l0HKMYV8053837@apollo.backplane.com> <20070118113831.A11834@delplex.bde.org> <200701181948.l0IJmdfn061671@apollo.backplane.com> <45AFED63.7020009@FreeBSD.org> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <25EB3FED-71A9-4AE1-9A38-5D2DC27D0DF7@mac.com> Content-Transfer-Encoding: 7bit From: Chuck Swiger Date: Thu, 18 Jan 2007 14:17:57 -0800 To: Maxim Sobolev X-Mailer: Apple Mail (2.752.2) X-Brightmail-Tracker: AAAAAA== Cc: freebsd-current@FreeBSD.org, freebsd-arch@FreeBSD.org Subject: Re: [PATCH] Mantaining turnstile aligned to 128 bytes in i386 CPUs X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jan 2007 22:17:59 -0000 On Jan 18, 2007, at 1:57 PM, Maxim Sobolev wrote: > Heh, it's so complex, so machine-dependent.... Well, yes. :) > That makes me wonder why we still don't have 3 simple to use > instructions that do equivalent of memmove(), memcpy() and memset() > all in hardware in the best possible way with the respect of block > size, alignment, caches, chipset, you-name-it? Virtually every > program would benefit from such instructions. Unfortunately, there are simply different tradeoffs between mechanisms for copying depending on whether you want to use or avoid using/thrashing the L1/L2 caches, whether the data is cache-aligned, and so forth; the CPU can't infer what you want to occur-- you have to tell it. I find it interesting that some of the architectures (PA- RISC, SPARC) do allow for simple instructions with cache-control hinting: http://gcc.gnu.org/projects/prefetch.html -- -Chuck