Re: [PATCH 0/2] Use READ_ONCE() and WRITE_ONCE in count_stat_eventual.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

--
To unsubscribe from this list: send the line "unsubscribe perfbook" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux