From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758142AbZBXQGt (ORCPT ); Tue, 24 Feb 2009 11:06:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752966AbZBXQGh (ORCPT ); Tue, 24 Feb 2009 11:06:37 -0500 Received: from one.firstfloor.org ([213.235.205.2]:40289 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752845AbZBXQGg (ORCPT ); Tue, 24 Feb 2009 11:06:36 -0500 Date: Tue, 24 Feb 2009 17:24:43 +0100 From: Andi Kleen To: Linus Torvalds Cc: Nick Piggin , Salman Qazi , davem@davemloft.net, linux-kernel@vger.kernel.org, Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , Andi Kleen Subject: Re: Performance regression in write() syscall Message-ID: <20090224162443.GW26292@one.firstfloor.org> References: <20090224020304.GA4496@google.com> <200902241510.33911.nickpiggin@yahoo.com.au> <200902242002.37555.nickpiggin@yahoo.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 24, 2009 at 07:52:34AM -0800, Linus Torvalds wrote: > > > On Tue, 24 Feb 2009, Nick Piggin wrote: > > > > > it does make some kind of sense to try to avoid the noncached versions for > > > small writes - because small writes tend to be for temp-files. > > > > I don't see the significance of a temp file. If the pagecache is truncated, > > then the cachelines remain dirty and so you can't avoid an eventual store > > back to RAM? > > No, because many small files end up being used as scratch-pads (think > shell script sequences etc), and get read back immediately again. Doing > non-temporal stores might just be bad simply because trying to play games > with caching may simply do the wrong thing. I usually recommend to use shmfs for /tmp. Perhaps that should be done more widely. BTW I got some upcomming patches to improve c_*_u() and memcpy on modern Intel x86 CPUs. -Andi