public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "David S. Miller" <davem@redhat.com>
Cc: Olaf Hering <olh@suse.de>,
	Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: consistent_sync_for_cpu() and friends on ppc32
Date: Wed, 17 Mar 2004 08:54:48 +1100	[thread overview]
Message-ID: <1079474087.920.14.camel@gaston> (raw)
In-Reply-To: <20040316104627.47fc1f25.davem@redhat.com>


> See, the direction really doesn't matter for the sync ops.

Well, the direction makes the difference between a flush and an
invalidation ;)

> If you flush the cpu caches at MAP time, and your PCI controller doesn't
> have DMA caching or something like that, then sync for CPU can always be
> a nop.  You will have always previously flushed the cpu caches before
> giving the buffer back to the device, either via MAP or sync for device
> calls.
> 
> So basically, make MAP and sync for device writeback flush the cpu caches.

No, flush on TO_DEVICE and BIDIRECTIONAL, invalidate on FROM_DEVICE,
it's less expensive to invalidate than flush in that case, since we
don't care about writing to real memory whatever junk the cache
contained for this area.

Ben.




      reply	other threads:[~2004-03-16 22:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-15 20:16 consistent_sync_for_cpu() and friends on ppc32 Olaf Hering
2004-03-15 20:36 ` David S. Miller
2004-03-15 21:59   ` Benjamin Herrenschmidt
2004-03-16  0:23   ` Benjamin Herrenschmidt
2004-03-16  0:49     ` David S. Miller
2004-03-16  1:36       ` Benjamin Herrenschmidt
2004-03-16 18:46         ` David S. Miller
2004-03-16 21:54           ` Benjamin Herrenschmidt [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=1079474087.920.14.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olh@suse.de \
    /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