| Summary: | [zfs] ZFS ceases caching when mem demand is high | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Peter Much <pmc> | ||||
| Component: | kern | Assignee: | Andriy Gapon <avg> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | 7.2-STABLE | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
Peter Much
2009-09-13 23:50:05 UTC
Responsible Changed From-To: freebsd-bugs->freebsd-fs Over to maintainer(s). Author: avg Date: Fri Sep 17 07:14:07 2010 New Revision: 212780 URL: http://svn.freebsd.org/changeset/base/212780 Log: zfs arc_reclaim_needed: more reasonable threshold for available pages vm_paging_target() is not a trigger of any kind for pageademon, but rather a "soft" target for it when it's already triggered. Thus, trying to keep 2048 pages above that level at the expense of ARC was simply driving ARC size into the ground even with normal memory loads. Instead, use a threshold at which a pagedaemon scan is triggered, so that ARC reclaiming helps with pagedaemon's task, but the latter still recycles active and inactive pages. PR: kern/146410, kern/138790 MFC after: 3 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Sep 17 04:55:01 2010 (r212779) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Sep 17 07:14:07 2010 (r212780) @@ -2161,10 +2161,10 @@ arc_reclaim_needed(void) return (0); /* - * If pages are needed or we're within 2048 pages - * of needing to page need to reclaim + * Cooperate with pagedaemon when it's time for it to scan + * and reclaim some pages. */ - if (vm_pages_needed || (vm_paging_target() > -2048)) + if (vm_paging_need()) return (1); #if 0 _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" Author: avg Date: Fri Sep 17 07:34:50 2010 New Revision: 212783 URL: http://svn.freebsd.org/changeset/base/212783 Log: zfs arc_reclaim_needed: fix typo in mismerge in r212780 PR: kern/146410, kern/138790 MFC after: 3 weeks X-MFC with: r212780 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Sep 17 07:20:20 2010 (r212782) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Sep 17 07:34:50 2010 (r212783) @@ -2160,7 +2160,7 @@ arc_reclaim_needed(void) * Cooperate with pagedaemon when it's time for it to scan * and reclaim some pages. */ - if (vm_paging_need()) + if (vm_paging_needed()) return (1); #if 0 _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" State Changed From-To: open->patched committed in head (r212783) Responsible Changed From-To: freebsd-fs->avg same as above State Changed From-To: patched->closed I think that this has been actually resolved for all branches where active ZFS development/maintenance takes place. |