Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 May 2009 10:37:29 -0700
From:      Marcel Moolenaar <xcllnt@mac.com>
To:        Peter Grehan <grehan@freebsd.org>
Cc:        FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   Re: [patch] __syncicache: eliminate D-cache flush
Message-ID:  <15E5E194-708A-4FA6-B105-2A85EE8B6982@mac.com>
In-Reply-To: <20090522032558.ETR51534@dommail.onthenet.com.au>
References:  <20090522032558.ETR51534@dommail.onthenet.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help

On May 21, 2009, at 10:25 AM, Peter Grehan wrote:

> Hi Marcel,
>
>> I'd like to commit the following change, which basically
>> removes the D-cache flush from syncicache.
>
> Isn't that required so that future instruction fetches will
> always pull in the value from memory and not have it sitting
> in the d-cache waiting to be flushed ?

We make sure that D-caches are flushed elsewhere. On the
one hand we have DMA-based I/O, for which the platform
guarantees coherency (if not, then busdma(9) fills the gap).
On the other hand we have md(4), NFS, etc, which use bcopy(9).
For those I recently added cpu_flush_dcache() so that they
flush the D-cache explicitly (needed because you sometimes
need to flush the D-cache based on the VA used for the copy)
At this time cpu_flush_dcache() is not implemented for AIM
nor booke. So far it doesn't look like it's needed on my
Xserve G4, but the email was to make sure that I have the
full picture. We may need to implement cpu_flush_dcache()
for G3 or G5 processors...

The bottomline is that D-caches are already flushed (if
needed) and all we need to do is synchronize the I-cache.

FYI,

-- 
Marcel Moolenaar
xcllnt@mac.com






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15E5E194-708A-4FA6-B105-2A85EE8B6982>