From: Ralf Baechle <ralf@linux-mips.org>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: linux-mips@linux-mips.org, Paul Gortmaker <paul.gortmaker@windriver.com>
Subject: Re: MIPS: Get rid of branches to .subsections.
Date: Mon, 23 Aug 2010 11:12:57 +0100 [thread overview]
Message-ID: <20100823101257.GA19171@linux-mips.org> (raw)
In-Reply-To: <alpine.LFD.2.00.1008230139480.900@eddie.linux-mips.org>
On Mon, Aug 23, 2010 at 01:54:24AM +0100, Maciej W. Rozycki wrote:
> > By rewriting the loop around all simple LL/SC blocks to C we reduce reduce
> > the amount of inline assembler and at the same time allow GCC to often
> > fill the branch delay slots with something sensible or whever else clever
> > optimization it may have up in its sleeve.
>
> Are you sure it won't reorder anything there that actually relies on the
> atomic access to have succeeded? I suggest adding barrier() after the
> loop.
None of the things that were touched by the code had any barrier
functionality Some of the functions such as atomic_add don't provide
memory barriers but where needed a barrier was always provided by C code
near the end of the function, for example in atomic_add_return.
Ralf
next prev parent reply other threads:[~2010-08-23 10:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-18 12:43 MIPS: Get rid of branches to .subsections Ralf Baechle
2010-08-18 13:25 ` Sergei Shtylyov
2010-08-18 13:42 ` Ralf Baechle
2010-08-18 13:33 ` Matt Fleming
2010-08-23 0:54 ` Maciej W. Rozycki
2010-08-23 10:12 ` Ralf Baechle [this message]
2010-08-23 11:25 ` Maciej W. Rozycki
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=20100823101257.GA19171@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=linux-mips@linux-mips.org \
--cc=macro@linux-mips.org \
--cc=paul.gortmaker@windriver.com \
/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