]> www.infradead.org Git - users/jedix/linux-maple.git/commit
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)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 20 Jul 2022 00:15:09 +0000 (20:15 -0400)
commit57a6e8d68e48c108552e17a7f26271a761f8f55b
treebd54df83e5821a663600b8dc8fcbf673d2229b07
parent383a1397e45e1c5c38bfb0832bfdf7a721f90a0f
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