public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: "David S. Miller" <davem@davemloft.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.13-rc3: cache flush missing from somewhere
Date: Sat, 30 Jul 2005 21:08:07 +0100	[thread overview]
Message-ID: <20050730210807.E26592@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20050730.124052.104057695.davem@davemloft.net>; from davem@davemloft.net on Sat, Jul 30, 2005 at 12:40:52PM -0700

On Sat, Jul 30, 2005 at 12:40:52PM -0700, David S. Miller wrote:
> From: Russell King <rmk+lkml@arm.linux.org.uk>
> > My current patch to get this working is below.  The only thing which
> > really seems to fix the issue is the __flush_dcache_page call in
> > read_pages() - if I remove this, I get spurious segfaults and illegal
> > instruction faults.
> 
> If one cpu stores, does it get picked up in the other cpu's I-cache?

No - there's absolutely no coherency between the I-cache and D-cache.
However, the I-cache and D-cache are individually PIPT.

> If not, you cannot use the lazy dcache flushing method, and in fact
> you must broadcast the flush on all processors.

I guess that answers the question, thanks.

> > If I call __flush_dcache_page() from update_mmu_cache() (iow, always
> > ensure that we have I/D coherency when the page is mapped into user
> > space) the effect is the same - I see random faults.
> 
> You have to do the flush on the processor that does the store,
> at a minimum.  But if other cpus have no way to "notice" stores
> on other cpus in their I-cache, this alone is not sufficient.
> 
> Based upon your report, I strongly suspect that remote I-caches
> do not see cpu local stores when the cache is in write allocate
> mode.  If this is true, it's a horrible design decision for an
> SMP system :(

I'm now told that the system is only coherent with the caches in
write back write allocate mode, which is rather odd since it appears
stable with write back read allocate.  However, I'll forward your
comments back to the designers.

Thanks David.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

  reply	other threads:[~2005-07-30 20:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-29 15:13 2.6.13-rc3: cache flush missing from somewhere Russell King
2005-07-30 19:40 ` David S. Miller
2005-07-30 20:08   ` Russell King [this message]
2005-07-31  0:09     ` David S. Miller
2005-08-01 12:24   ` Catalin Marinas
2005-08-01 15:35     ` David S. Miller
2005-08-01 16:34       ` Catalin Marinas
2005-08-01 16:40     ` Russell King
2005-08-01 16:54       ` Catalin Marinas
2005-08-01 17:01         ` Russell King
2005-08-01 18:37           ` Catalin Marinas

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=20050730210807.E26592@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=davem@davemloft.net \
    --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