public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2/2 2.5.45 cleanup & add original copy_ro/from_user
Date: Sat, 02 Nov 2002 03:03:15 -0800	[thread overview]
Message-ID: <3DC3B0F3.4C1ABDA7@digeo.com> (raw)
In-Reply-To: p73y98cqlv3.fsf@oldwotan.suse.de

Andi Kleen wrote:
> 
> Andrew Morton <akpm@digeo.com> writes:
> 
> > (That is, using the movnta instructions for well-aligned copies
> > and clears so that we don't read the destination memory while overwriting
> > it).
> 
> I did some experiments with movnta and it was near always a loss for
> memcpy/copy_*_user type stuff. The reason is that it flushes the destination
> out of cache and when you try to read it afterwards for some reason
> (which happens often - e.g. most copy_*_user uses actually do access it
> afterwards) then you eat a full cache miss for them and that is costly
> and kills all other advantages.

Oh.  I was under the impression that the destination ended up in the
CPU caches.

Yes, if that's not the case then the whole thing is pretty useless.

> It may be a win for direct copy-to-page cache and then page cache DMA
> outside and page cache not mapped anywhere, but even then it's not completely
> clear it's that helpful to have it not in cache. For example an Athlon
> can serve an DMA directly out of its CPU caches and that may be
> faster than serving it out of RAM (Intel CPUs cannot however)

So it may be applicable to write(2) on intel.

  reply	other threads:[~2002-11-02 10:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20021102025838.220E.AT541@columbia.edu.suse.lists.linux.kernel>
     [not found] ` <3DC3A9C0.7979C276@digeo.com.suse.lists.linux.kernel>
2002-11-02 10:58   ` [PATCH] 2/2 2.5.45 cleanup & add original copy_ro/from_user Andi Kleen
2002-11-02 11:03     ` Andrew Morton [this message]
2002-11-02 16:55     ` Denis Vlasenko
2002-11-02 12:09       ` Andi Kleen
2002-11-02 17:08         ` Denis Vlasenko
2002-11-02 12:23           ` Andi Kleen
2002-11-04  3:36 Akira Tsukamoto
  -- strict thread matches above, loose matches on Subject: below --
2002-11-02  8:06 Akira Tsukamoto
2002-11-02 10:32 ` Andrew Morton
2002-11-02 11:07   ` Akira Tsukamoto
2002-11-02 18:13     ` Andrew Morton
2002-11-03  2:43       ` Akira Tsukamoto
2002-11-03  4:04         ` Andrew Morton
2002-11-03  2:43       ` Akira Tsukamoto
2002-11-03  2:57   ` Akira Tsukamoto
2002-11-03 21:24     ` Dave Jones
2002-11-03 22:22       ` Andries Brouwer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3DC3B0F3.4C1ABDA7@digeo.com \
    --to=akpm@digeo.com \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox