]> git.baikalelectronics.ru Git - kernel.git/commit
mm/khugepaged.c: replace barrier() with READ_ONCE() for a selective variable
authorYanfei Xu <yanfei.xu@windriver.com>
Wed, 5 May 2021 01:34:12 +0000 (18:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 5 May 2021 18:27:21 +0000 (11:27 -0700)
commit84cf25af1921f729312a8cb4349bd06aa887c5da
tree263a679299230b85d8ef4d54c09661da7af81a81
parent52ce5f073c5c6cc2a09ba7aaf497a4a621207d85
mm/khugepaged.c: replace barrier() with READ_ONCE() for a selective variable

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.

Link: https://lkml.kernel.org/r/20210323092730.247583-1-yanfei.xu@windriver.com
Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/khugepaged.c