All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about SMP
@ 1999-05-07  4:42 Brad Boyer
  1999-05-07  4:19 ` Charles E. Leiserson, Jr.
  1999-05-07 17:54 ` Sriranga Veeraraghavan
  0 siblings, 2 replies; 7+ messages in thread
From: Brad Boyer @ 1999-05-07  4:42 UTC (permalink / raw)
  To: linuxppc-dev



I've been trying to get SMP working on my PowerMac for some time now,
and it just never seems to work.  I've tried compiling my own kernels,
as well as compiling my own, and I've never had a working SMP system.
I just tried to compile a 2.2.7 kernel from the rsync code on
samba.anu.edu.au and got a better result than I have in a while, but
still not good.  It starts up fine, but then fails as soon as it has
to start using the scheduler.  It prints out the first line in
rc.sysinit, which is the comment about starting swap, tries to run
swapon, and then just starts printing messages to the console about
spin_lock and write_lock, I believe it was.  I wrote down the
addresses it had in the errors, and looked them up in the System.map.
The first one was in schedule() with a pointer to scheduler_lock, and
the other one only gave a pointer, which was waitqueue_lock.

I started looking at kernel/sched.c which is where most of this stuff
is, and I didn't see anything obvious, but I did notice a few things
that seemed odd.  Do spinlocks only exist in an SMP kernel?  I ask
because there is a spinlock where the matching unlock is in an #ifdef
__SMP__ which seemed like a bad idea.  If anyone can help me get this
running, I'd appreciate it.  I'm more than willing to fiddle around
with the code if someone can give me some hints on this stuff.

	 Brad Boyer
	 flar@cegt201.bradley.edu

[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Question about SMP
@ 2010-06-07 20:11 Dave Hylands
  2010-06-25 16:16 ` Catalin Marinas
  0 siblings, 1 reply; 7+ messages in thread
From: Dave Hylands @ 2010-06-07 20:11 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

(filled in subject line this time - Doh).

I'm trying to understand what I need to be concerned about with SMP
processors and sharing global data (in particular a dual Cortex-A9)

I'm familiar with spinlocks, but in this case I'm trying to work with
some lockless data structures.

What I'm not sure is whether the following would work. Suppose I have
a couple of 8-bit get/put indicies which are in adjacent memory
locations (within the same 32-bit word).

If I have an ISR and a thread running on an SMP core, and the ISR is
running on one core and the thread is running on a second core, if the
ISR were to only write to the put pointer and the thread were only to
write to the get pointer, does the cache maintain consistency? Or do
the get and put pointers need to be in separate cache lines?

Another way of asking this: If both cores are writing to the same
32-bit word (but different bytes) do the writes collide?

--
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-06-25 16:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-05-07  4:42 Question about SMP Brad Boyer
1999-05-07  4:19 ` Charles E. Leiserson, Jr.
1999-05-07 17:54 ` Sriranga Veeraraghavan
1999-05-07 21:36   ` Brad Boyer
1999-05-08  2:36     ` LinuxPPC/iMac instabilities Derek Moeller
  -- strict thread matches above, loose matches on Subject: below --
2010-06-07 20:11 Question about SMP Dave Hylands
2010-06-25 16:16 ` Catalin Marinas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.