* [Linux-ia64] Q: stack coherency
@ 2000-03-11 9:02 Manfred Spraul
2000-03-13 18:52 ` David Mosberger
0 siblings, 1 reply; 2+ messages in thread
From: Manfred Spraul @ 2000-03-11 9:02 UTC (permalink / raw)
To: linux-ia64
Can I access a structure that's stored on the stack of one CPU from
another CPU? I'm just noisy because I always did that [e.g SysV message
code ipc/msg.c], and now a friend asked me if that's true for all cpu
architecures.
CPU1:
- initialize linked list element [local variable]
- spin_lock
- add to linked list
- spin_unlock
- ...
CPU2:
- spin_lock
- walk the linked list
- spin_unlock.
--
Manfred
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Linux-ia64] Q: stack coherency
2000-03-11 9:02 [Linux-ia64] Q: stack coherency Manfred Spraul
@ 2000-03-13 18:52 ` David Mosberger
0 siblings, 0 replies; 2+ messages in thread
From: David Mosberger @ 2000-03-13 18:52 UTC (permalink / raw)
To: linux-ia64
>>>>> On Sat, 11 Mar 2000 10:02:06 +0100, Manfred Spraul <manfreds@colorfullife.com> said:
Manfred> Can I access a structure that's stored on the stack of one
Manfred> CPU from another CPU?
IA-64 is no different in this respect from other architectures. If
you have an SMP/NUMA/whatever system where the CPUs share the
address-space, you will be able to access the stack of another thread
(assuming the thread's stack is mapped in the address space). Of
course, you also need to have proper synchronization to ensure the
stack is still live when the second CPU is trying to access it.
I'm not 100% sure what you're asking though, because the "subject"
line of your mail asks about stack coherency. Coherency is an
orthogonal issue to accessibility. IA-64 uses a weakly ordered memory
model to achieve high performance. It's probably best to read the
IA-64 architecture manual for the details (see Section 4.4 at
http://devresource.hp.com/devresource/Docs/Refs/IA64ISA/), but loosely
speaking, memory accesses that happen between a spin-lock/-unlock
pair, will be ordered with respect to accesses by other CPUs.
--david
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-03-13 18:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-03-11 9:02 [Linux-ia64] Q: stack coherency Manfred Spraul
2000-03-13 18:52 ` David Mosberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox