mirror_zfs/module/os/freebsd/zfs
Alexander Motin 55427add3c
Several improvements to ARC shrinking (#16197)
- When receiving memory pressure signal from OS be more strict
trying to free some memory.  Otherwise kernel may come again and
request much more.  Return as result how much arc_c was actually
reduced due to this request, that may be less than requested.
 - On Linux when receiving direct reclaim from some file system
(that may be ZFS) instead of ignoring request completely, just
shrink the ARC, but do not wait for eviction.  Waiting there may
cause deadlock.  Ignoring it as before may put extra pressure on
other caches and/or swap, and cause OOM if nothing help.  While
not waiting may result in more ARC evicted later, and may be too
late if OOM killer activate right now, but I hope it to be better
than doing nothing at all.
 - On Linux set arc_no_grow before waiting for reclaim, not after,
or it may grow back while we are waiting.
 - On Linux add new parameter zfs_arc_shrinker_seeks to balance
ARC eviction cost, relative to page cache and other subsystems.
 - Slightly update Linux arc_set_sys_free() math for new kernels.

Signed-off-by:	Alexander Motin <mav@FreeBSD.org>
Sponsored by:	iXsystems, Inc.
Reviewed-by: Rob Norris <rob.norris@klarasystems.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
2024-07-25 10:31:14 -07:00
..
abd_os.c abd: add page iterator 2024-03-25 16:50:35 -07:00
arc_os.c Several improvements to ARC shrinking (#16197) 2024-07-25 10:31:14 -07:00
crypto_os.c freebsd: remove __FBSDID macro use 2023-11-17 14:02:09 -08:00
dmu_os.c dmu: Allow buffer fills to fail 2023-12-15 09:51:41 -08:00
event_os.c FreeBSD: Fix the build on FreeBSD 12 2023-11-27 12:58:03 -08:00
hkdf.c Remove bcopy(), bzero(), bcmp() 2022-03-15 15:13:42 -07:00
kmod_core.c FreeBSD: unregister mountroot eventhandler on unload 2024-06-13 17:49:50 -07:00
spa_os.c Fix build on FreeBSD 2023-03-22 09:24:41 -07:00
sysctl_os.c freebsd: remove __FBSDID macro use 2023-11-17 14:02:09 -08:00
vdev_file.c zio: rename ZIO_TYPE_IOCTL to ZIO_TYPE_FLUSH 2024-04-11 17:17:23 -07:00
vdev_geom.c Replace P2ALIGN with P2ALIGN_TYPED and delete P2ALIGN. 2024-05-10 08:47:21 -07:00
vdev_label_os.c Use abd_zero_off() where applicable 2023-11-17 13:28:32 -08:00
zfs_acl.c Use list_remove_head() where possible. 2023-06-09 10:12:52 -07:00
zfs_ctldir.c FreeBSD: Fix ZFS so that snapshots under .zfs/snapshot are NFS visible 2023-11-27 16:31:03 -08:00
zfs_debug.c zdb/ztest: send dbgmsg output to stderr 2024-05-14 09:49:00 -07:00
zfs_dir.c FreeBSD: Add zfs_link_create() error handling 2024-05-16 17:56:55 -07:00
zfs_file_os.c Fix file descriptor leak on pool import. 2024-01-23 15:03:48 -08:00
zfs_ioctl_compat.c freebsd: remove __FBSDID macro use 2023-11-17 14:02:09 -08:00
zfs_ioctl_os.c freebsd: remove __FBSDID macro use 2023-11-17 14:02:09 -08:00
zfs_racct.c module: zfs: fix unused, remove argsused 2021-12-23 09:42:47 -08:00
zfs_vfsops.c BRT: Fix FICLONE/FICLONERANGE shortened copy 2024-02-05 16:44:45 -08:00
zfs_vnops_os.c FreeBSD: Add zfs_link_create() error handling 2024-05-16 17:56:55 -07:00
zfs_znode.c FreeBSD: Add zfs_link_create() error handling 2024-05-16 17:56:55 -07:00
zio_crypt.c ZIL: Assert record sizes in different places 2023-11-28 13:35:14 -08:00
zvol_os.c zvol: Fix suspend lock leaks (#16270) 2024-07-10 14:27:44 -07:00