From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754107AbZB1RnH (ORCPT ); Sat, 28 Feb 2009 12:43:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753114AbZB1Rmz (ORCPT ); Sat, 28 Feb 2009 12:42:55 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:55014 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752809AbZB1Rmy (ORCPT ); Sat, 28 Feb 2009 12:42:54 -0500 Date: Sat, 28 Feb 2009 09:42:18 -0800 (PST) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: Arjan van de Ven cc: Ingo Molnar , Nick Piggin , Salman Qazi , davem@davemloft.net, linux-kernel@vger.kernel.org, Thomas Gleixner , "H. Peter Anvin" , Andi Kleen Subject: Re: [patch] x86, mm: pass in 'total' to __copy_from_user_*nocache() In-Reply-To: <20090228092450.3ded2db5@infradead.org> Message-ID: References: <20090224020304.GA4496@google.com> <200902272305.01867.nickpiggin@yahoo.com.au> <20090228082922.GB11425@elte.hu> <200902282249.57479.nickpiggin@yahoo.com.au> <20090228125816.GA14917@elte.hu> <20090228092450.3ded2db5@infradead.org> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 28 Feb 2009, Arjan van de Ven wrote: > > it invalidates all caches in the hierarchy Yeah, now that I look at the intel pdf's, I see that. > afaik this is what Intel cpus do; but I also thought this behavior was > quite architectural as well... Ok, I really think we should definitely not use non-temporal stores for anything smaller than one full page in that case. In fact, I wonder if even any of the old streaming benchmarks are even true. I thought it would still stay in the L3, but yes, it literally seems to make the access totally noncached and WC. That's almost unacceptable in the long run. With a 8MB L3 cache - and a compile sequence, do we really want to go out to memory to write the .S file, and then have the assembler go out to memory to read it back? For a compile, that _probably_ is all fine (the compiler in particular will have enough data structures around that it's not going to fit in the cache anyway), but I'm seeing leaner compilers and other cases where forcing things out all the way on the bus is simply the wrong thing. Linus