Commit 0add0e52 authored by Andrew Yang's avatar Andrew Yang Committed by Treehugger Robot
Browse files

UPSTREAM: fs: drop_caches: draining pages before dropping caches

commit 8a144612 upstream.

We expect a file page access after dropping caches should be a major
fault, but sometimes it's still a minor fault.  That's because a file page
can't be dropped if it's in a per-cpu pagevec.  Draining all pages from
per-cpu pagevec to lru list before trying to drop caches.

Link: https://lkml.kernel.org/r/20230630092203.16080-1-andrew.yang@mediatek.com


Change-Id: I9b03c53e39b87134d5ddd0c40ac9b36cf4d190cd
Signed-off-by: default avatarAndrew Yang <andrew.yang@mediatek.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Bug: 285794522
Signed-off-by: default avatarWill McVicker <willmcviker@google.com>
parent 0d1f309e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment