From: Sriranga Veeraraghavan <ranga@CSUA.Berkeley.EDU>
To: Brad Boyer <flar@cegt201.bradley.edu>
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: Question about SMP
Date: Fri, 07 May 1999 10:54:03 -0700 [thread overview]
Message-ID: <199905071754.KAA09699@soda.CSUA.Berkeley.EDU> (raw)
In-Reply-To: Your message of "Thu, 06 May 1999 23:42:45 CDT." <199905070442.XAA11076@cegt201.bradley.edu>
> 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.
My knowledge of SMP is limited, but in general spin locks are required
only on MP machines. If you use a spin lock (condition variable?) on
a single processor machine, basically your thread ends up spinning
until its time slice runs out, which is not particularly efficient.
I think that on single processors locks are implemented using sem_wait
and sem_post, where these enable and disable interrupts. This is not
possible on MP machines, so spin locks are used instead. (Someone
please correct me if I'm wrong).
>From you post, I take it that my SMP kernel didn't work for you. What
was the exact problem you had?
----ranga <ranga@soda.berkeley.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. ]]
next prev parent reply other threads:[~1999-05-07 17:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
1999-05-07 21:36 ` Brad Boyer
1999-05-08 2:36 ` LinuxPPC/iMac instabilities Derek Moeller
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=199905071754.KAA09699@soda.CSUA.Berkeley.EDU \
--to=ranga@csua.berkeley.edu \
--cc=flar@cegt201.bradley.edu \
--cc=linuxppc-dev@lists.linuxppc.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;
as well as URLs for NNTP newsgroup(s).