From: Benjamin Herrenschmidt <bh40@calva.net>
To: Paul.Mackerras@cs.anu.edu.au, linuxppc-dev@lists.linuxppc.org,
kbhend@business.wm.edu
Subject: Re: PPC Kernel Gurus Help?
Date: Wed, 14 Apr 1999 15:37:26 +0200 [thread overview]
Message-ID: <19990414153726.018323@mail.mipsys.com> (raw)
In-Reply-To: <199904120448.OAA20256@tango.anu.edu.au>
On Mon, Apr 12, 1999, Paul Mackerras <paulus@cs.anu.edu.au> wrote:
> >I hope Apple's implementation is just overkill. The linuxthreads
>> >pt-machine.h file in both glibc 1.99 and glibc 2.1 do not have the extra
>> >isyncs (they just use sync both before and after the routine). They also
>> >do not align things to cache boundaries. To do that we would have to
>> >change the sem_t because both the spinlock and the semaphore value are
>> >side by side and both are accessed this way meaning that sem_t would have
>> >to be 32 byte aligned and take up 64 bytes to be safe (32 for the
>> >semaphore and 32 for the spinlock).
>
>Does it use lwarx/stwcx. to access both the spinlock and the
>semaphore? If so that could possibly cause a problem if they are in
>the same cache line (strictly, "reservation granule").
Don't care about what I said, I was just plain wrong (still having
trouble with PPC assembly...). Apple's implementation doesn't watch for
32 byte alignement but for 4 byte alignement, which is a lot more
understandable.
If I understand things correctly, however, there is still a potential
problem in MP, if two atomics are in the same granule, and two processors
are trying to use them at the same time. I beleive we should make sure
the kernel's atomic type takes a whole granule (cache line).
--
E-Mail: <mailto:bh40@calva.net>
BenH. Web : <http://calvaweb.calvacom.fr/bh40/>
[[ 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-04-14 13:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-04-11 18:15 PPC Kernel Gurus Help? Kevin B. Hendricks
1999-04-12 4:48 ` Paul Mackerras
1999-04-12 18:41 ` Crashing My PowerbookG3-Series when writing to the serial port Alexander Derbes
1999-04-14 13:37 ` Benjamin Herrenschmidt [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-04-12 20:49 PPC Kernel Gurus Help? Edward Swarthout
[not found] <370E71B0.577788B0@synxis.com>
[not found] ` <19990411150328.032219@mail.mipsys.com>
1999-04-11 15:07 ` Kevin B. Hendricks
1999-04-12 4:38 ` Paul Mackerras
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=19990414153726.018323@mail.mipsys.com \
--to=bh40@calva.net \
--cc=Paul.Mackerras@cs.anu.edu.au \
--cc=kbhend@business.wm.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).