mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
ARC: Notify dbuf cache about target size reduction
ARC target size might drop significantly under memory pressure, especially if current ARC size was much smaller than the target. Since dbuf cache size is a fraction of the target ARC size, it might need eviction too. Aside of memory from the dbuf eviction itself, it might help ARC by making more buffers evictable. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Ameer Hamza <ahamza@ixsystems.com> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes #17314
This commit is contained in:
@@ -297,6 +297,7 @@
|
||||
#include <sys/dsl_pool.h>
|
||||
#include <sys/multilist.h>
|
||||
#include <sys/abd.h>
|
||||
#include <sys/dbuf.h>
|
||||
#include <sys/zil.h>
|
||||
#include <sys/fm/fs/zfs.h>
|
||||
#include <sys/callb.h>
|
||||
@@ -4555,6 +4556,13 @@ arc_reduce_target_size(uint64_t to_free)
|
||||
to_free = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Since dbuf cache size is a fraction of target ARC size, we should
|
||||
* notify dbuf about the reduction, which might be significant,
|
||||
* especially if current ARC size was much smaller than the target.
|
||||
*/
|
||||
dbuf_cache_reduce_target_size();
|
||||
|
||||
/*
|
||||
* Whether or not we reduced the target size, request eviction if the
|
||||
* current size is over it now, since caller obviously wants some RAM.
|
||||
|
||||
Reference in New Issue
Block a user