From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Junchang Wang <junchangwang@gmail.com>
Cc: perfbook@vger.kernel.org
Subject: Re: [PATCH 0/2] Use READ_ONCE() and WRITE_ONCE in count_stat_eventual.c
Date: Thu, 11 May 2017 09:51:04 -0700 [thread overview]
Message-ID: <20170511165104.GJ3956@linux.vnet.ibm.com> (raw)
In-Reply-To: <1494515022-30278-1-git-send-email-junchangwang@gmail.com>
On Thu, May 11, 2017 at 11:03:40PM +0800, Junchang Wang wrote:
> 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.
Very nice, sometimes we get lucky. ;-)
Queue and pushed, thank you!
Thanx, Paul
> 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
>
> --
> To unsubscribe from this list: send the line "unsubscribe perfbook" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2017-05-11 16:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Paul E. McKenney [this message]
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=20170511165104.GJ3956@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=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.