mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: bos@serpentine.com
Cc: linux-kernel@vger.kernel.org, arjan@infradead.org
Subject: Re: [PATCH] Add memcpy_cachebypass, a copy routine that tries to keep cache pressure down
Date: Tue, 11 Jul 2006 13:57:29 -0700 (PDT)	[thread overview]
Message-ID: <20060711.135729.104381402.davem@davemloft.net> (raw)
In-Reply-To: <da0cd816c4cb37c4376b.1152651055@localhost.localdomain>

From: Bryan O'Sullivan <bos@serpentine.com>
Date: Tue, 11 Jul 2006 13:50:55 -0700

> This copy routine is memcpy-compatible, but on some architectures will use
> cache-bypassing loads to avoid bringing the source data into the cache.
> 
> One case where this is useful is when a device issues a DMA to a memory
> region, and the CPU must copy the DMAed data elsewhere before doing any
> work with it.  Since the source data is read-once, write-never from the
> CPU's perspective, caching those addresses can only evict potentially
> useful data.
> 
> We provide an x86_64 implementation that uses SSE non-temporal loads,
> and a generic version that falls back to plain memcpy.
> 
> Implementors for other arches should not use cache-bypassing stores to
> the destination, as in most cases, the destination is accessed almost
> immediately after a copy finishes.
> 
> Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
> Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>

Please don't use a weak attribute, and instead use the same
"__HAVE_ARCH_FOO" cpp test scheme used for the other string
operations to allow a platform to override the default
implementation in lib/string.x

  parent reply	other threads:[~2006-07-11 20:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-11 20:50 Bryan O'Sullivan
2006-07-11 20:56 ` Arjan van de Ven
2006-07-11 20:57 ` David Miller [this message]
2006-07-11 21:30   ` Bryan O'Sullivan
2006-07-11 21:57     ` David Miller
2006-07-11 22:05       ` Bryan O'Sullivan
2006-07-11 22:08         ` David Miller
2006-07-12  8:04       ` Christoph Hellwig
2006-07-11 21:09 ` Randy.Dunlap
2006-07-11 21:35   ` Bryan O'Sullivan
2006-07-11 22:48     ` Randy.Dunlap
2006-07-12 16:15 ` Andi Kleen

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=20060711.135729.104381402.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=arjan@infradead.org \
    --cc=bos@serpentine.com \
    --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

all inboxes | Powered by JetHome®