From: Jun Sun <jsun@mvista.com>
To: William Jhun <wjhun@ayrnetworks.com>
Cc: linux-mips@oss.sgi.com, ralf@oss.sgi.com, davem@redhat.com
Subject: Re: [PATCH] include/asm-mips/pci.h: More optimal cache behavior, added "prep" routines
Date: Tue, 28 May 2002 09:49:47 -0700 [thread overview]
Message-ID: <3CF3B52B.508@mvista.com> (raw)
In-Reply-To: 20020525150302.A8264@ayrnetworks.com
William Jhun wrote:
> On Sat, May 25, 2002 at 01:18:06PM -0700, William Jhun wrote:
>
>>When preparing a buffer for a DMA transfer, we've found it's more
>>optimal to only do a wback_inv if the direction is not known
>>(PCIDMA_BIDIRECTIONAL), only a wback if transfer is to the device
>>(PCIDMA_TO_DEVICE), and only an invalidate if from the device
>>(PCIDMA_FROM_DEVICE). Such a modification has made a small (yet
>>significant) improvement for one of our network drivers during a packet
>>forwarding rate test.
>>
>
> *sigh*. On the platform we were testing on, we used our own cache code
> (rm7k with tertiary cache support) which has been well-tested for over a
> year now. In these routines, we implement dma_cache_wback and only do
> invalidates (no flush) for dma_cache_wback_inv. Now that I'm looking
> around in cache support for other MIPS CPUs, I see that all the _wback
> calls are not implemented and that many (or all?) of the _inv calls also
> flush the caches.
>
> The patch below leaves the existing funtions alone and just adds the two
> pci_dma_prep_{sg,single}() calls.
>
> My question is: why are these dma_cache_wback calls not implemented? And
> how come dma_cache_inv is treated the same as dma_cache_wback_inv? Are
> we doing something wrong by implementing these calls in our cache code
> as they are described?
>
In theory cache_wback and cache_inv are doing different things. In
practice, however, since the call must be made *before* dma transfer starts so
the effects are same. Of course, _inv() version is more efficient if it is
implemented.
Jun
prev parent reply other threads:[~2002-05-28 16:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-25 20:18 [PATCH] include/asm-mips/pci.h: More optimal cache behavior, added "prep" routines William Jhun
2002-05-25 22:03 ` William Jhun
2002-05-28 16:49 ` Jun Sun [this message]
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=3CF3B52B.508@mvista.com \
--to=jsun@mvista.com \
--cc=davem@redhat.com \
--cc=linux-mips@oss.sgi.com \
--cc=ralf@oss.sgi.com \
--cc=wjhun@ayrnetworks.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.