ARC: Cache arc_c value during arc_evict()
commit4ebe674d91fa942751a51fa55fda5ebe7db6165e
authorAlexander Motin <mav@FreeBSD.org>
Fri, 4 Oct 2024 17:56:43 +0000 (4 13:56 -0400)
committerGitHub <noreply@github.com>
Fri, 4 Oct 2024 17:56:43 +0000 (4 10:56 -0700)
tree88607cb7195249c60ca9fa97b0583587e6924c64
parent0d77e738e65d2fdc37c9c345c022f14239ae67cb
ARC: Cache arc_c value during arc_evict()

Since arc_evict() run can take some time, arc_c change during it
may result in undesired shift in ARC states balance. Primarily in
case of arc_c reduction it may cause eviction from MFU data state
despite its being below the target already.  Instead we should
evict as originally planned and if needed do another round after.

Reviewed-by: Theera K. <tkittich@hotmail.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #16576
Closes #16605
module/zfs/arc.c