DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Wathsala Vithanage <wathsala.vithanage@arm.com>
Cc: honnappa.nagarahalli@arm.com, konstantin.v.ananyev@yandex.ru,
	feifei.wang2@arm.com, dev@dpdk.org, nd@arm.com
Subject: Re: [RFC] ring: improve ring performance with C11 atomics
Date: Fri, 21 Apr 2023 14:27:06 -0700	[thread overview]
Message-ID: <20230421142706.55f3d928@hermes.local> (raw)
In-Reply-To: <20230421191446.216958-1-wathsala.vithanage@arm.com>

On Fri, 21 Apr 2023 19:14:46 +0000
Wathsala Vithanage <wathsala.vithanage@arm.com> wrote:

>  		/* Ensure the head is read before tail */
>  		__atomic_thread_fence(__ATOMIC_ACQUIRE);
>  
> -		/* load-acquire synchronize with store-release of ht->tail
> -		 * in update_tail.
> -		 */

This makes sense since tail is already synchronized by the previous thread fence.

Probably best to add the comment about ht->tail into the existing thread_fence comment.
Something like:
		/* Ensure that head is read before tail and that tail synchronized with update_tail */

  reply	other threads:[~2023-04-21 21:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21 19:14 Wathsala Vithanage
2023-04-21 21:27 ` Stephen Hemminger [this message]
2023-04-21 19:16 Wathsala Vithanage
2023-04-22 13:19 ` Morten Brørup
2023-06-08 13:21 ` Wathsala Wathawana Vithanage

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=20230421142706.55f3d928@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=feifei.wang2@arm.com \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=nd@arm.com \
    --cc=wathsala.vithanage@arm.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 NNTP newsgroup(s).