public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Torvald Riegel <triegel@redhat.com>
To: Stefan Liebler <stli@linux.vnet.ibm.com>
Cc: libc-alpha@sourceware.org, "Joseph S. Myers" <joseph@codesourcery.com>
Subject: Re: [PATCH 1/2] [PING] Optimize generic spinlock code and use C11 like atomic macros.
Date: Wed, 31 May 2017 16:48:00 -0000	[thread overview]
Message-ID: <1496249292.5890.1034.camel@redhat.com> (raw)
In-Reply-To: <f25d852a-fec9-c6a3-c781-437f94a06800@linux.vnet.ibm.com>

On Wed, 2017-05-31 at 10:29 +0200, Stefan Liebler wrote:
> On 05/30/2017 09:18 AM, Torvald Riegel wrote:
> > On Wed, 2017-05-10 at 15:00 +0200, Stefan Liebler wrote:
> >> On 05/03/2017 01:38 PM, Stefan Liebler wrote:
> >>> On 04/25/2017 08:46 AM, Stefan Liebler wrote:
> >>>> On 04/18/2017 03:09 PM, Stefan Liebler wrote:
> >>>>> On 04/10/2017 01:59 PM, Stefan Liebler wrote:
> >>>>>> On 04/09/2017 03:51 PM, Torvald Riegel wrote:
> >>>>>>> On Fri, 2017-04-07 at 18:22 +0200, Stefan Liebler wrote:
> >>>>>>>> @architecture maintainers:
> >>>>>>>> I've added defines of ATOMIC_EXCHANGE_USES_CAS in the architecture
> >>>>>>>> specific atomic-machine.h files.
> >>>>>>>> See comment in include/atomic.h:
> >>>>>>>> /* ATOMIC_EXCHANGE_USES_CAS is equal to 1 if atomic_exchange
> >>>>>>>> operations
> >>>>>>>>      are implemented based on a CAS loop; otherwise, this is 0 and we
> >>>>>>>> assume
> >>>>>>>>      that the atomic_exchange operations could provide better
> >>>>>>>> performance
> >>>>>>>>      than a CAS loop.  */
> >>>>>>>>
> >>>>>>>> Can review the definition to 0 or 1 in the atomic-machine.h file of
> >>>>>>>> your
> >>>>>>>> architecture, please?
> >>>>>
> >>>>>
> >>>>> PING
> >>>>>
> >>>> PING
> >>>
> >>> PING
> >>
> >> PING
> >>
> >> @Torvald:
> >> I'm not sure if we will get answers from everybody.
> >> What do you propose how to proceed with the definitions of
> >> ATOMIC_EXCHANGE_USES_CAS?
> > 
> > Which archs are still missing?  If maintainers don't reply, I suggest we
> > do our best to figure out what's the case for each missing arch, and add
> > a note that it should be checked eventually (eg, /* XXX Is this actually
> > correct?  */) to the code, and then commit.  Please CC: me on such a
> > patch, so I can have a last look at it.
> > 
> 
> We are sure for these archs:
> -aarch64: #define ATOMIC_EXCHANGE_USES_CAS 0
> -i386/x86: #define ATOMIC_EXCHANGE_USES_CAS 0
> -mips: #define ATOMIC_EXCHANGE_USES_CAS 0/1
> -powerpc: #define ATOMIC_EXCHANGE_USES_CAS 1
> -s390: #define ATOMIC_EXCHANGE_USES_CAS 1
> -tile: #define ATOMIC_EXCHANGE_USES_CAS 0
> 
> Nobody answered for these archs:
> -alpha: #define ATOMIC_EXCHANGE_USES_CAS 1
> -arm: #define ATOMIC_EXCHANGE_USES_CAS 1
> -hppa: #define ATOMIC_EXCHANGE_USES_CAS 1
> -ia64: #define ATOMIC_EXCHANGE_USES_CAS 0
> -m68k: #define ATOMIC_EXCHANGE_USES_CAS 1
> -microblaze: #define ATOMIC_EXCHANGE_USES_CAS 1
> -nios2: #define ATOMIC_EXCHANGE_USES_CAS 1
> -sh: #define ATOMIC_EXCHANGE_USES_CAS 1
> -sparc: #define ATOMIC_EXCHANGE_USES_CAS 1

Joseph, can you clarify for arm?

> In the two of three sparc files ...
> ./sysdeps/sparc/sparc64/atomic-machine.h
> ./sysdeps/sparc/sparc32/sparcv9/atomic-machine.h
> ... there is the swap instruction in macro atomic_exchange_acq
> for 4 bytes.  Other sizes are aborted or done by CAS.
> Shall we use #define ATOMIC_EXCHANGE_USES_CAS 0 here?

I suggest we let the sparc maintainer take care of that (though we could
set it to 0 for sparc32 I guess).

> 
> I've attached the current version with
> /* XXX Is this actually correct?  */
> for all architecture for which we didn't get an answer.
> 
> The second patch "S390: Use generic spinlock code." remains the same.

I'd wait for a few more days to give Joseph time to respond, and then
commit if there are no objections or further input.  I think maintainers
had enough time to comment, and you pinged them often enough already.

Thanks for being patient! :)

  reply	other threads:[~2017-05-31 16:48 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-16 16:32 [PATCH 1/2] " Stefan Liebler
2016-12-16 16:32 ` [PATCH 2/2] S390: Use generic spinlock code Stefan Liebler
2017-02-08 14:49   ` Stefan Liebler
2017-02-13 20:39     ` Torvald Riegel
2017-02-15 16:26       ` Stefan Liebler
2017-02-18 17:05         ` Torvald Riegel
2017-03-14 15:55           ` Stefan Liebler
2017-03-21 15:43             ` Stefan Liebler
2017-04-06 12:27             ` Torvald Riegel
2016-12-19 12:14 ` [PATCH 1/2] Optimize generic spinlock code and use C11 like atomic macros Szabolcs Nagy
2017-02-08 14:49   ` Stefan Liebler
2017-02-13 20:29     ` Torvald Riegel
2017-02-15  9:36       ` Stefan Liebler
2017-02-18 16:57         ` Torvald Riegel
2017-02-19  9:20           ` Florian Weimer
2017-02-20 13:11             ` Torvald Riegel
2017-02-26  7:55               ` Florian Weimer
2017-02-26 20:06                 ` Torvald Riegel
2017-02-26 20:29                   ` Florian Weimer
2017-02-26 20:35                     ` Torvald Riegel
2017-02-27 17:57                       ` Szabolcs Nagy
2017-02-28  7:15                         ` Torvald Riegel
2017-03-14 15:55                           ` Stefan Liebler
2017-02-20 12:15           ` Stefan Liebler
2017-02-20 13:51             ` Torvald Riegel
2017-03-14 15:55               ` Stefan Liebler
2017-03-21 15:43                 ` Stefan Liebler
2017-03-22 12:56                   ` Szabolcs Nagy
2017-03-23 16:16                     ` Stefan Liebler
2017-03-23 17:52                       ` Szabolcs Nagy
2017-04-06 12:04                     ` Torvald Riegel
2017-03-27 13:08                   ` Stefan Liebler
2017-04-04 10:29                     ` [PING] " Stefan Liebler
2017-03-29 14:16                 ` Stefan Liebler
2017-04-06 14:00                 ` Torvald Riegel
2017-04-07 16:23                   ` Stefan Liebler
2017-04-09 13:51                     ` Torvald Riegel
2017-04-10 12:00                       ` Stefan Liebler
2017-04-18 13:09                         ` Stefan Liebler
2017-04-25  6:47                           ` Stefan Liebler
2017-05-03 11:38                             ` [PATCH 1/2] [PING] " Stefan Liebler
2017-05-10 13:00                               ` Stefan Liebler
2017-05-17 13:09                                 ` Stefan Liebler
2017-05-24  6:37                                   ` Stefan Liebler
2017-05-30  7:18                                 ` Torvald Riegel
2017-05-31  8:29                                   ` Stefan Liebler
2017-05-31 16:48                                     ` Torvald Riegel [this message]
2017-06-01 13:40                                       ` Joseph Myers
2017-06-01 14:33                                         ` Torvald Riegel
2017-06-06  7:51                                       ` [PATCH 1/2] [COMMITTED] " Stefan Liebler
2017-04-10  8:17                     ` [PATCH 1/2] " Andreas Schwab
2017-04-10 12:00                       ` Stefan Liebler
2017-04-10 13:36                         ` Andreas Schwab
2017-04-11  7:06                           ` Stefan Liebler
2017-04-11  8:45                             ` Andreas Schwab
2017-04-11 10:15                               ` Stefan Liebler
2017-04-11 12:05                                 ` Andreas Schwab
2017-04-11 12:19                                   ` Stefan Liebler
2017-04-11 13:08                                   ` Zack Weinberg
2017-04-13 16:36                             ` Torvald Riegel
2017-05-30 21:00                     ` Tulio Magno Quites Machado Filho
2017-04-18 21:17                   ` Joseph Myers
2017-04-19  8:27                     ` Stefan Liebler

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=1496249292.5890.1034.camel@redhat.com \
    --to=triegel@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=stli@linux.vnet.ibm.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).