public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] Remove catomics
Date: Tue, 5 Jul 2022 11:16:49 +0000	[thread overview]
Message-ID: <AM5PR0801MB16687EADE28456267CBF458983819@AM5PR0801MB1668.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <A8970DF4-4066-40E0-96D7-D3AF40227B12@linaro.org>

Hi Adhemerval,

> Since this patch removes a x86 optimization (sorry, I realized it after my review), 
> I think it would be better if circle back and first get my single-thread refactor
> patches in (which fixes SINGLE_THREAD_P syscall on aarch64 and other architectures)
> since it does not change x86.

It's a typical target "optimization" - not only slower but also functionally incorrect...

> After we can then remove the unused catomic operation and make the single-thread
> optimization locking generic (so we can finally remove x86 arch-specific bits).

I'm not sure I'm following - the catomics are not used in any locks or in performance
critical code that could benefit from single-threaded optimizations. In fact my patch
improves performance by using much faster relaxed atomics (since all we need is 
atomicity for the counter increments).

Single-threaded locking optimizations are completely independent of all this, and so is
your SINGLE_THREAD_P patch.

So the only concern here is rebase clashes due to your patch rewriting all the x86 code.
My point is that this unnecessary. The catomics are useless and all of the target specific
code can be removed since it is either unused already or will be soon after follow-up
patches. So why first rewrite it all? It just seems lots of work for no gain...

Cheers,
Wilco

  reply	other threads:[~2022-07-05 11:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-16 10:01 Wilco Dijkstra
2022-06-16 20:06 ` Adhemerval Zanella
2022-06-17 11:56   ` Wilco Dijkstra
2022-06-22 13:00     ` Adhemerval Zanella
2022-07-05 11:16       ` Wilco Dijkstra [this message]
2022-07-06 12:15         ` Adhemerval Zanella

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=AM5PR0801MB16687EADE28456267CBF458983819@AM5PR0801MB1668.eurprd08.prod.outlook.com \
    --to=wilco.dijkstra@arm.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).