Re: [PATCH] khugepaged: Raplace barrier() with READ_ONCE() for a selective variable

From: Kirill A. Shutemov
Date: Tue Mar 23 2021 - 06:21:47 EST

On Tue, Mar 23, 2021 at 05:27:30PM +0800, yanfei.xu@xxxxxxxxxxxxx wrote:
> From: Yanfei Xu <yanfei.xu@xxxxxxxxxxxxx>
> READ_ONCE() is more selective and lightweight. It is more appropriate that
> using a READ_ONCE() for the certain variable to prevent the compiler from
> reordering.
> Signed-off-by: Yanfei Xu <yanfei.xu@xxxxxxxxxxxxx>

Acked-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>

Kirill A. Shutemov