Re: Performance regression in write() syscall

From: Andi Kleen
Date: Tue Feb 24 2009 - 11:06:48 EST


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/