All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Use READ_ONCE() and WRITE_ONCE in count_stat_eventual.c
@ 2017-05-11 15:03 Junchang Wang
  2017-05-11 15:03 ` [PATCH 1/2] count_stat_eventual: Switch from ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE() Junchang Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Junchang Wang @ 2017-05-11 15:03 UTC (permalink / raw)
  To: perfbook; +Cc: Junchang Wang

Hi Paul,

Please check the updated patch. The first patch is to replace existing
ACCESS_ONCE to new READ/WRITE_ONCE primitives, and the second to protect global
share variable stopflag.

BTW, I didn't see any performance differences between versions using volatile
and READ/WRITE_ONCE primitives on my 16 cores Intel machine. I guess the major
reason is that the sample code is simple such that registers are enough even if
keyword volatile is used.


Junchang Wang (2):
  count_stat_eventual: Switch from ACCESS_ONCE() to
    READ_ONCE()/WRITE_ONCE()
  count_stat_eventual: Add READ_ONCE() to protect global shared variable
    stopflag

 CodeSamples/count/count_stat_eventual.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

-- 
2.7.4


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

end of thread, other threads:[~2017-05-16 13:14 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-11 15:03 [PATCH 0/2] Use READ_ONCE() and WRITE_ONCE in count_stat_eventual.c Junchang Wang
2017-05-11 15:03 ` [PATCH 1/2] count_stat_eventual: Switch from ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE() Junchang Wang
2017-05-13 12:04   ` Akira Yokosawa
2017-05-13 12:45     ` Paul E. McKenney
2017-05-13 13:31       ` Junchang Wang
2017-05-13 22:57         ` Paul E. McKenney
2017-05-13 14:37       ` Akira Yokosawa
2017-05-13 22:56         ` Paul E. McKenney
2017-05-14  0:58           ` Akira Yokosawa
2017-05-14  1:31             ` Akira Yokosawa
2017-05-14  4:20               ` Paul E. McKenney
2017-05-14 13:56                 ` Junchang Wang
2017-05-14 15:15                 ` Akira Yokosawa
2017-05-15  0:31                   ` Paul E. McKenney
2017-05-15 14:35                     ` Akira Yokosawa
2017-05-16  4:16                       ` Paul E. McKenney
2017-05-11 15:03 ` [PATCH 2/2] count_stat_eventual: Add READ_ONCE() to protect global shared variable stopflag Junchang Wang
2017-05-14 10:57   ` Akira Yokosawa
2017-05-14 13:28     ` Junchang Wang
2017-05-14 22:57       ` Akira Yokosawa
2017-05-16 13:14         ` Junchang Wang
2017-05-11 16:51 ` [PATCH 0/2] Use READ_ONCE() and WRITE_ONCE in count_stat_eventual.c Paul E. McKenney

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.