public inbox for [email protected]
 help / color / mirror / Atom feed
From: Hrvoje Zeba <[email protected]>
To: Bart Van Assche <[email protected]>
Cc: [email protected]
Subject: Re: [RFC PATCH] Fix usage of stdatomic.h for C++ compilers
Date: Sat, 27 Jun 2020 11:39:40 -0400	[thread overview]
Message-ID: <CAEsUgYj6NDoHPHN+i7tsR5P0tj1Dj47ixJFhFf8UVpm7kagfhg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>

On Sat, Jun 27, 2020 at 11:27 AM Bart Van Assche <[email protected]> wrote:
>
> On 2020-06-26 22:55, Hrvoje Zeba wrote:
> > Since b9c0bf79aa8, liburing.h doesn't compile with C++ compilers. C++
> > provides it's own <atomic> interface and <stdatomic.h> can't be used. This
> > is a minimal change to use <atomic> variants where needed.
>
> I was not aware that liburing supports C++ compilers?
>

Why is this there then?
https://git.kernel.dk/cgit/liburing/tree/src/include/liburing.h#n6

> >  struct io_uring_cq {
> > -     unsigned *khead;
> > -     unsigned *ktail;
> > +     atomic_uint *khead;
> > +     atomic_uint *ktail;
>
> I think this is the wrong way to make liburing again compatible with
> C++ compilers. Changing these data types causes all dereferences of
> these pointers to be translated by the compiler into sequentially
> consistent atomic instructions. I expect this patch to have a
> negative impact on the performance of liburing.
>

Any suggestions?

  reply	other threads:[~2020-06-27 15:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-27  5:55 [RFC PATCH] Fix usage of stdatomic.h for C++ compilers Hrvoje Zeba
2020-06-27  5:59 ` Hrvoje Zeba
2020-06-27 15:27 ` Bart Van Assche
2020-06-27 15:39   ` Hrvoje Zeba [this message]
2020-06-27 16:23     ` Bart Van Assche
2020-06-27 16:42       ` Hrvoje Zeba
2020-06-28 13:35       ` Jens Axboe

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=CAEsUgYj6NDoHPHN+i7tsR5P0tj1Dj47ixJFhFf8UVpm7kagfhg@mail.gmail.com \
    [email protected] \
    [email protected] \
    [email protected] \
    /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