]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Do not ignore arc_adjust() return value.
authormav <mav@FreeBSD.org>
Sat, 10 Nov 2018 01:58:37 +0000 (01:58 +0000)
committermav <mav@FreeBSD.org>
Sat, 10 Nov 2018 01:58:37 +0000 (01:58 +0000)
commit7ddbc411f2496f4d1716ac699cafeb4b897fb714
tree922f828b969189738d6db4161d2209a1fd4f73f4
parent7f7d4fc5f9f075bc67747a5c8c0a9f1db6b59ba2
Do not ignore arc_adjust() return value.

This covers scenario when ARC may not shrink as fast as it could:
1. arc_size < arc_c and arc_adjust() does not evict anything, returning
   zero to arc_reclaim_thread();
2. arc_available_memory() reports memory pressure, which can not be
   satisfied by arc_kmem_reap_now();
3. arc_shrink() reduces arc_c and calls arc_adjust(), return of which is
   ignored;
4. even if the last arc_adjust() could not satisfy arc_size < arc_c,
   arc_reclaim_thread() will still go to sleep, since the first one
   returned zero.

Reviewed by: allanjude, markj, sef
MFC after: 2 weeks
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D17927
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c