public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Question about the barrier() in hlist_nulls_for_each_entry_rcu()
@ 2023-07-20 18:53 Alan Huang
  2023-07-20 19:22 ` Eric Dumazet
  2023-07-21 11:51 ` David Laight
  0 siblings, 2 replies; 26+ messages in thread
From: Alan Huang @ 2023-07-20 18:53 UTC (permalink / raw)
  To: linux-kernel, netdev, rcu; +Cc: Paul E. McKenney, Eric Dumazet, roman.gushchin

Hi,

I noticed a commit c87a124a5d5e(“net: force a reload of first item in hlist_nulls_for_each_entry_rcu”)
and a related discussion [1].

After reading the whole discussion, it seems like that ptr->field was cached by gcc even with the deprecated
ACCESS_ONCE(), so my question is:

	Is that a compiler bug? If so, has this bug been fixed today, ten years later? 
	
	What about READ_ONCE(ptr->field)?


[1] https://lore.kernel.org/all/1369699930.3301.494.camel@edumazet-glaptop/

Thanks,
Alan

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2023-08-03 14:41 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-20 18:53 Question about the barrier() in hlist_nulls_for_each_entry_rcu() Alan Huang
2023-07-20 19:22 ` Eric Dumazet
2023-07-20 19:59   ` Alan Huang
2023-07-20 21:11     ` Eric Dumazet
2023-07-21 14:31       ` Alan Huang
2023-07-21 14:47         ` Eric Dumazet
2023-07-21 15:21           ` Alan Huang
2023-07-21 12:54     ` Joel Fernandes
2023-07-21 14:27       ` Alan Huang
2023-07-21 15:21         ` Joel Fernandes
2023-07-21 15:54           ` Alan Huang
2023-07-21 16:00             ` Joel Fernandes
2023-07-21 15:59           ` David Laight
2023-07-21 17:14             ` Joel Fernandes
2023-07-21 20:08           ` Alan Huang
2023-07-21 20:40             ` Alan Huang
2023-07-21 21:25               ` Alan Huang
2023-07-22 13:32               ` Alan Huang
2023-07-22 14:06                 ` David Laight
2023-07-22 15:00                   ` Alan Huang
2023-07-31 20:09         ` Paul E. McKenney
2023-08-03 13:40           ` Alan Huang
2023-08-03 13:53             ` Paul E. McKenney
2023-08-03 14:39               ` David Laight
2023-07-21 11:51 ` David Laight
2023-07-21 15:55   ` Alan Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox