From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Richard Henderson <rth@twiddle.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch] 2.4.4 alpha semaphores optimization
Date: Sat, 5 May 2001 17:55:47 +0400 [thread overview]
Message-ID: <20010505175547.A2302@jurassic.park.msu.ru> (raw)
In-Reply-To: <20010503194747.A552@jurassic.park.msu.ru> <20010504141240.A11122@twiddle.net>
In-Reply-To: <20010504141240.A11122@twiddle.net>; from rth@twiddle.net on Fri, May 04, 2001 at 02:12:40PM -0700
On Fri, May 04, 2001 at 02:12:40PM -0700, Richard Henderson wrote:
> > - removed some mb's for non-SMP
>
> This isn't correct. Either you need atomic updates or you don't.
> If you don't, then you shouldn't be using ll/sc at all.
I don't think so. On a single CPU system we need atomic updates
to protect modifying of critical variables from interrupts, and
ll/sc sequences guarantee exactly that. But on UP system we don't
need memory barriers of any kind (I mean system memory space accesses,
not IO, of course), as we don't care about read/write ordering at all.
> If you do
> (perhaps to coordinate with devices) then the barriers are required.
For IO space access mb's are required, but ll/sc are of no use, AFAIK.
However, if I understand correctly, the r/w semaphores can't be used from
interrupt context, so in this case I'd agree -- this stuff could be made
completely non-atomic for UP.
> > - removed non-inline up()/down_xx() when semaphore/waitqueue debugging
> > isn't enabled.
>
> They should still be exported for module compatibility.
If you mean some external modules, then ok. The modules built from the
main tree shouldn't have any problems...
Ivan.
next prev parent reply other threads:[~2001-05-05 13:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-03 15:47 Ivan Kokshaysky
2001-05-03 17:28 ` Andrea Arcangeli
2001-05-04 9:15 ` Ivan Kokshaysky
2001-05-04 14:33 ` Andrea Arcangeli
2001-05-04 17:02 ` Ivan Kokshaysky
2001-05-04 17:16 ` Andrea Arcangeli
2001-05-04 9:22 ` David Howells
2001-05-04 9:54 ` Ivan Kokshaysky
2001-05-04 16:46 ` Ivan Kokshaysky
2001-05-04 21:12 ` Richard Henderson
2001-05-05 13:55 ` Ivan Kokshaysky [this message]
2001-05-06 6:55 ` Ivan Kokshaysky
2001-05-04 21:13 ` Richard Henderson
2001-05-05 14:17 ` Ivan Kokshaysky
2001-05-05 17:06 ` __builtin_expect vs inlining Richard Henderson
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=20010505175547.A2302@jurassic.park.msu.ru \
--to=ink@jurassic.park.msu.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=rth@twiddle.net \
/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
all inboxes | Powered by JetHome®