Thread (60 messages) 60 messages, 9 authors, 2021-07-09

Re: [dpdk-dev] [PATCH v3 2/2] ring: use wfe to wait for ring tail update on aarch64

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2021-04-29 15:05:49

On Thu, 29 Apr 2021 14:35:35 +0000
Ruifeng Wang [off-list ref] wrote:
quoted
-----Original Message-----
From: Stephen Hemminger <stephen@networkplumber.org>
Sent: Thursday, April 29, 2021 1:17 AM
To: Ruifeng Wang <redacted>
Cc: Honnappa Nagarahalli <redacted>; Konstantin
Ananyev [off-list ref]; dev@dpdk.org;
david.marchand@redhat.com; thomas@monjalon.net; jerinj@marvell.com;
nd [off-list ref]; Gavin Hu [off-list ref]; Steve Capper
[off-list ref]; Ola Liljedahl [off-list ref]
Subject: Re: [dpdk-dev] [PATCH v3 2/2] ring: use wfe to wait for ring tail
update on aarch64

On Sun, 25 Apr 2021 05:56:53 +0000
Ruifeng Wang [off-list ref] wrote:
  
quoted
Instead of polling for tail to be updated, use wfe instruction.

Signed-off-by: Gavin Hu <redacted>
Signed-off-by: Ruifeng Wang <redacted>
Reviewed-by: Steve Capper <redacted>
Reviewed-by: Ola Liljedahl <redacted>
Reviewed-by: Honnappa Nagarahalli <redacted>
Acked-by: Konstantin Ananyev <redacted>  
Looks ok to me, but it does raise an interesting question.
Shouldn't the original code have been using atomic load to look at ht->tail.

This another place where "volatile considered harmful" applies.  
Do you mean 'volatile' should be removed from rte_wait_until_equal_xxx parameters?
I meant that all access to tail should be via C11 atomic builtin. At that point,
the volatile on the data structure elements does not matter.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help