mm/swap: pull the CPU conditional out of __lru_add_drain_all()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 17 Jun 2022 17:50:08 +0000 (18:50 +0100)
committerakpm <akpm@linux-foundation.org>
Mon, 4 Jul 2022 01:08:46 +0000 (18:08 -0700)
commit4864545a4669781f75aa711ebf7b25e6f0f37d13
treefa9574a7d3e212edb3f9b6f0378280fbc6f0b329
parent82ac64d86fb079431e3af618a074e77be398299b
mm/swap: pull the CPU conditional out of __lru_add_drain_all()

The function is too long, so pull this complicated conditional out into
cpu_needs_drain().  This ends up shrinking the text by 14 bytes,
by allowing GCC to cache the result of calling per_cpu() instead of
relocating each lookup individually.

Link: https://lkml.kernel.org/r/20220617175020.717127-11-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/swap.c