mirror_zfs/include/os/linux/kernel/linux
Alexander Motin 20bf8c6638 Linux: Stop using NR_FILE_PAGES for ARC scaling
I've found that QEMU/KVM guest memory accounted as shared also
included into NR_FILE_PAGES.  But it is actually a non-evictable
anonymous memory.  Using it as a base for zfs_arc_pc_percent
parameter makes ARC to ignore shrinker requests while page cache
does not really have anything to evict, ending up in OOM killer
killing the QEMU process.

Instead use of NR_ACTIVE_FILE + NR_INACTIVE_FILE should represent
the part of a page cache that is actually evictable, which should
be safer to use as a reference for ARC scaling.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ameer Hamza <ahamza@ixsystems.com>
Reviewed-by: Pavel Snajdr <snajpa@snajpa.net>
Signed-off-by:	Alexander Motin <mav@FreeBSD.org>
Sponsored by:	iXsystems, Inc.
Closes #17334
(cherry picked from commit 0aa83dce99)
2025-05-27 14:41:45 -07:00
..
blkdev_compat.h linux: zvols: correctly detect flush requests 2025-05-27 14:41:45 -07:00
compiler_compat.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
dcache_compat.h config: remove HAVE_D_MAKE_ROOT 2024-11-15 10:14:57 -08:00
kmap_compat.h Use kmap_local_page instead of kmap_atomic (#16329) 2024-11-15 10:14:57 -08:00
mm_compat.h Linux 6.12: PG_error flag was removed 2024-11-15 10:15:01 -08:00
mod_compat.h vdev_disk: rewrite BIO filling machinery to avoid split pages 2024-03-28 13:29:46 -07:00
page_compat.h Linux: Stop using NR_FILE_PAGES for ARC scaling 2025-05-27 14:41:45 -07:00
simd_aarch64.h Linux 6.2 compat: add check for kernel_neon_* availability 2024-01-12 12:38:27 -08:00
simd_arm.h Linux 6.2 compat: add check for kernel_neon_* availability 2024-01-12 12:38:27 -08:00
simd_powerpc.h Refactor CONFIG_SPE check on Linux/powerpc 2023-03-15 10:30:42 -07:00
simd_x86.h Avoid save/restoring AMX registers to avoid a SPR erratum 2023-08-27 08:25:42 -07:00
simd.h Add SIMD metadata in /proc on Linux 2024-11-05 15:43:52 -08:00
utsname_compat.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
vfs_compat.h Linux 6.12: f_version removed from struct file 2024-11-15 10:15:01 -08:00
xattr_compat.h config: remove HAVE_XATTR_GET_DENTRY_INODE 2024-11-15 10:14:59 -08:00