Re: [PATCH] advsync: Get rid of ACCESS_ONCE()

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

 



On Sun, Dec 08, 2019 at 08:43:54AM +0900, Akira Yokosawa wrote:
> >From 77ced05dd5df0aa61358643ae359e8afb5e731fc Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@xxxxxxxxx>
> Date: Sun, 8 Dec 2019 07:15:54 +0900
> Subject: [PATCH] advsync: Get rid of ACCESS_ONCE()
> 
> Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>

Queued and pushed, good catch, thank you!

							Thanx, Paul

> ---
>  advsync/advsync.tex | 2 +-
>  advsync/rt.tex      | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/advsync/advsync.tex b/advsync/advsync.tex
> index ee99ec87..d860d2db 100644
> --- a/advsync/advsync.tex
> +++ b/advsync/advsync.tex
> @@ -181,7 +181,7 @@ The linearizability criterion for NBS algorithms requires that reads from
>  and updates to the array either use atomic instructions or be accompanied
>  by memory barriers, but in the not-uncommon case where linearizability
>  is not important, simple volatile loads and stores suffice, for example,
> -using \co{ACCESS_ONCE()}.
> +using \co{READ_ONCE()} and \co{WRITE_ONCE()}.
>  
>  An NBS set may also be implemented using a bitmap, where each value that
>  might be a member of the set corresponds to one bit.
> diff --git a/advsync/rt.tex b/advsync/rt.tex
> index e5ec1bd9..a92b83d0 100644
> --- a/advsync/rt.tex
> +++ b/advsync/rt.tex
> @@ -1174,7 +1174,7 @@ void __rcu_read_unlock(void)		        \lnlbl[unl:b]
>  		barrier();			\lnlbl[unl:bar1]
>  		t->rcu_read_lock_nesting = INT_MIN;  \lnlbl[unl:neg]
>  		barrier();			\lnlbl[unl:bar2]
> -		if (ACCESS_ONCE(t->rcu_read_unlock_special.s)) \lnlbl[unl:chks]
> +		if (READ_ONCE(t->rcu_read_unlock_special.s)) \lnlbl[unl:chks]
>  			rcu_read_unlock_special(t);  \lnlbl[unl:unls]
>  		barrier();			\lnlbl[unl:bar3]
>  		t->rcu_read_lock_nesting = 0;	\lnlbl[unl:zero]
> -- 
> 2.17.1
> 



[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