From: Justin Carlson <carlson@sibyte.com>
To: linux-mips@oss.sgi.com
Subject: Cache/TLB ops atomicty/SMP effects
Date: Tue, 6 Feb 2001 11:47:35 -0800 [thread overview]
Message-ID: <0102061209410T.21018@plugh.sibyte.com> (raw)
>From what I've been able to dig up, I gather that the majority of the cache
flushing ops are only used for virtually indexed caches, wherein virutal
aliasing is a potential problem upon changing the page tables or somesuch.
Documentation/cachetlb.txt seems a bit out of date, but covers most of it.
That's fine. But there are the times when you've modified a memory region and
need to then execute from the same region. In those cases on a split-cache
architecture, the icache needs to be flushed. More specifically, this sequence
needs to happen:
flush_dirty_data_from_dcache()
sync()
invalidate_icache_region()
In an SMP system, one of two things needs to be true:
1) The entire sequence, from initial write of code to dataspace to icache
invalidate, needs to be run on a single processor. Since the scheduler doesn't
guarantee processor allocations to work that way, the entire code sequence has
to be atomic.
-OR-
2) We need to execute the writeback and icache invalidate on all processors in
the system, with synchronization points occuring after the dcache writeback
as well as after the icache invalidate.
The first option looks completely infeasible, and if the second option is
implemented in the mips64 tree, I'm just missing it somehow. The sparc/
tree has smp_flush_cache type ops in arch/sparc/kernel/smp.c. The mips64
tree, though, has support for cross cpu TLB flushes, but not for cache flushes.
Does anyone with a clearer grasp of how this works care to enlighten me?
Thanks,
Justin
--
carlson@broadcom.com
(408) 922-7098
WARNING: multiple messages have this Message-ID (diff)
From: Justin Carlson <carlson@sibyte.com>
To: linux-mips@oss.sgi.com
Subject: Cache/TLB ops atomicty/SMP effects
Date: Tue, 6 Feb 2001 11:47:35 -0800 [thread overview]
Message-ID: <0102061209410T.21018@plugh.sibyte.com> (raw)
Message-ID: <20010206194735.E5o9t56XgdMiHAf-sOFuR-1zTfXPGKvjkWIR-o1ZJLY@z> (raw)
From what I've been able to dig up, I gather that the majority of the cache
flushing ops are only used for virtually indexed caches, wherein virutal
aliasing is a potential problem upon changing the page tables or somesuch.
Documentation/cachetlb.txt seems a bit out of date, but covers most of it.
That's fine. But there are the times when you've modified a memory region and
need to then execute from the same region. In those cases on a split-cache
architecture, the icache needs to be flushed. More specifically, this sequence
needs to happen:
flush_dirty_data_from_dcache()
sync()
invalidate_icache_region()
In an SMP system, one of two things needs to be true:
1) The entire sequence, from initial write of code to dataspace to icache
invalidate, needs to be run on a single processor. Since the scheduler doesn't
guarantee processor allocations to work that way, the entire code sequence has
to be atomic.
-OR-
2) We need to execute the writeback and icache invalidate on all processors in
the system, with synchronization points occuring after the dcache writeback
as well as after the icache invalidate.
The first option looks completely infeasible, and if the second option is
implemented in the mips64 tree, I'm just missing it somehow. The sparc/
tree has smp_flush_cache type ops in arch/sparc/kernel/smp.c. The mips64
tree, though, has support for cross cpu TLB flushes, but not for cache flushes.
Does anyone with a clearer grasp of how this works care to enlighten me?
Thanks,
Justin
--
carlson@broadcom.com
(408) 922-7098
next reply other threads:[~2001-02-06 20:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-06 19:47 Justin Carlson [this message]
2001-02-06 19:47 ` Cache/TLB ops atomicty/SMP effects Justin Carlson
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=0102061209410T.21018@plugh.sibyte.com \
--to=carlson@sibyte.com \
--cc=linux-mips@oss.sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox