From: Bart Van Assche <[email protected]>
To: Hrvoje Zeba <[email protected]>, [email protected]
Subject: Re: [RFC PATCH] Fix usage of stdatomic.h for C++ compilers
Date: Sat, 27 Jun 2020 08:27:09 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
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?
> 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.
Bart.
next prev parent reply other threads:[~2020-06-27 15:27 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 [this message]
2020-06-27 15:39 ` Hrvoje Zeba
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 \
[email protected] \
[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