public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Guenther <richard.guenther@gmail.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Andrew Haley <aph@redhat.com>, gcc-patches@gcc.gnu.org
Subject: Re: PATCH: Add pause intrinsic
Date: Wed, 25 May 2011 15:31:00 -0000	[thread overview]
Message-ID: <BANLkTinTUcHSQMg2CJHQ6HQpb9cUEQEyjw@mail.gmail.com> (raw)
In-Reply-To: <BANLkTimxM2ShsCyWd9-f75b6VtJCep73Bw@mail.gmail.com>

On Wed, May 25, 2011 at 4:47 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Wed, May 25, 2011 at 7:36 AM, Andrew Haley <aph@redhat.com> wrote:
>> On 05/25/2011 01:34 PM, H.J. Lu wrote:
>>> On Wed, May 25, 2011 at 3:26 AM, Andrew Haley <aph@redhat.com> wrote:
>>>> On 05/24/2011 07:28 PM, H.J. Lu wrote:
>>>>
>>>>> This patch implements pause intrinsic suggested by Andi.  OK
>>>>> for trunk?
>>>>
>>>> What does "full memory barrier" here mean?
>>>>
>>>> +@table @code
>>>> +@item void __builtin_ia32_pause (void)
>>>> +Generates the @code{pause} machine instruction with full memory barrier.
>>>> +@end table
>>>>
>>>> There a memory clobber, but no barrier instruction AFAICS.  The
>>>> doc needs to explain it a bit better.
>>>
>>> There are read/load memory barrier, write/store memory barrier and full/general
>>> memory barrier.  You can find them at
>>>
>>> http://www.kernel.org/doc/Documentation/memory-barriers.txt
>>>
>>> Should I include a pointer to it?
>>
>> No.  I know perfectly well what memory barriers are.  I'm not asking
>> what "full memory barrier" means.
>>
>> What barrier instruction(s) does __builtin_ia32_pause() generate?
>> All I see in the patch is "rep; nop".  Is that really a full memory
>> barrier?
>>
>
> It is a full memory barrier in the sense that compiler won't move
> load/store across it.  It is intended for kernel.

There is no such thing if you include accesses to automatic variables.

Richard.

> --
> H.J.
>

  parent reply	other threads:[~2011-05-25 14:51 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-24 19:35 H.J. Lu
2011-05-25 12:36 ` Andrew Haley
2011-05-25 13:20   ` Richard Guenther
2011-05-25 13:45     ` H.J. Lu
2011-05-25 13:40   ` H.J. Lu
2011-05-25 14:51     ` Andrew Haley
2011-05-25 15:19       ` H.J. Lu
2011-05-25 15:31         ` Andrew Haley
2011-05-25 15:32           ` Richard Guenther
2011-05-25 16:05             ` Andrew Haley
2011-05-25 16:16               ` Richard Guenther
2011-05-25 16:32                 ` Michael Matz
2011-05-25 16:39                   ` Richard Guenther
2011-05-25 16:53                     ` H.J. Lu
2011-05-25 17:30                       ` Andrew Haley
2011-05-25 17:56                         ` H.J. Lu
2011-05-25 18:09                           ` Andrew Pinski
2011-05-25 18:16                             ` Andrew Haley
2011-05-26 10:49                           ` Richard Guenther
2011-05-26 13:51                             ` Andrew Haley
2011-05-26 14:39                               ` Richard Guenther
2011-05-26 14:45                                 ` Andrew Haley
2011-05-26 15:19                                   ` Richard Guenther
2011-05-26 15:37                                     ` Jakub Jelinek
2011-05-26 15:42                                       ` Richard Guenther
2011-05-26 15:43                                     ` Andrew Haley
2011-05-26 15:58                                       ` Michael Matz
2011-05-26 17:36                                     ` Andi Kleen
2011-05-26 17:40                                       ` Jakub Jelinek
2011-05-26 18:23                                         ` Andi Kleen
2011-05-26 18:37                                           ` Paul Koning
2011-05-26 19:05                                             ` Andi Kleen
2011-05-26 21:56                                             ` Basile Starynkevitch
2011-05-30 10:39                                               ` Andrew Haley
2011-05-25 15:31         ` Richard Guenther [this message]
2011-05-25 19:53   ` Basile Starynkevitch
2011-05-25 20:03     ` H.J. Lu
2011-05-25 21:10       ` Basile Starynkevitch
2011-05-26  9:35     ` Andrew Haley
2011-05-26 17:37     ` Andi Kleen
2011-05-26 17:48       ` Basile Starynkevitch
2011-05-25 14:08 ` Uros Bizjak

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=BANLkTinTUcHSQMg2CJHQ6HQpb9cUEQEyjw@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=aph@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hjl.tools@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).