Re: [PATCH] mm/swap: avoid a xa load for swapout path

From: Matthew Wilcox
Date: Mon Oct 16 2023 - 23:00:48 EST


On Tue, Oct 17, 2023 at 09:17:28AM +0800, Kairui Song wrote:
> From: Kairui Song <kasong@xxxxxxxxxxx>
>
> A variable is never used for swapout path (shadowp is NULL) and compiler
> is unable to optimize out the unneeded load since it's a function call.
>
> Signed-off-by: Kairui Song <kasong@xxxxxxxxxxx>

Reviewed-by: Matthew Wilcox (Oracle)

Possibly worth adding a reference to
3852f6768ede ("mm/swapcache: support to handle the shadow entries")

Not sure it's worth a Fixes:, but that's where it was introduced.