From: Junchang Wang <junchangwang@gmail.com>
To: perfbook@vger.kernel.org
Cc: Junchang Wang <junchangwang@gmail.com>
Subject: [PATCH 0/2] Use READ_ONCE() and WRITE_ONCE in count_stat_eventual.c
Date: Thu, 11 May 2017 23:03:40 +0800 [thread overview]
Message-ID: <1494515022-30278-1-git-send-email-junchangwang@gmail.com> (raw)
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
next reply other threads:[~2017-05-11 15:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-11 15:03 Junchang Wang [this message]
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
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=1494515022-30278-1-git-send-email-junchangwang@gmail.com \
--to=junchangwang@gmail.com \
--cc=perfbook@vger.kernel.org \
/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 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.