mm/mmzone.c: use try_cmpxchg() in page_cpupid_xchg_last()
authorPeter Collingbourne <pcc@google.com>
Mon, 28 Feb 2022 23:00:53 +0000 (10:00 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 28 Feb 2022 23:00:53 +0000 (10:00 +1100)
commitd05d60686cba0583b5904d841ab1121b7edc6f72
treee4926e12b4b507609542411d23c56b0ca428b42b
parentf4f88febcebf39b34004127ecbbb3360bb16564f
mm/mmzone.c: use try_cmpxchg() in page_cpupid_xchg_last()

This will let us avoid an additional read from page->flags when retrying
the compare-exchange on some architectures.

Link: https://lkml.kernel.org/r/20220120011200.1322836-1-pcc@google.com
Link: https://linux-review.googlesource.com/id/I2e1f5b5b080ac9c4e0eb7f98768dba6fd7821693
Signed-off-by: Peter Collingbourne <pcc@google.com>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Mel Gorman <mgorman@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
mm/mmzone.c