Date: Wed, 17 Aug 2016 15:50:56 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r304294 - user/alc/PQ_LAUNDRY/sys/vm Message-ID: <201608171550.u7HFouQV098255@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: alc Date: Wed Aug 17 15:50:56 2016 New Revision: 304294 URL: https://svnweb.freebsd.org/changeset/base/304294 Log: Update "gen" after a shortfall laundering so that the page daemon wakeup that coincided with the shortfall laundering can't again trigger a future background laundering. Reviewed by: markj Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Wed Aug 17 15:14:21 2016 (r304293) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Wed Aug 17 15:50:56 2016 (r304294) @@ -1096,6 +1096,7 @@ vm_pageout_laundry_worker(void *arg) KASSERT(cycle >= 0, ("negative cycle %d", cycle)); KASSERT(target >= 0, ("negative target %d", target)); launder = 0; + wakeups = VM_METER_PCPU_CNT(v_pdwakeups); /* * First determine whether we need to launder pages to meet a @@ -1126,6 +1127,7 @@ vm_pageout_laundry_worker(void *arg) */ if (vm_laundry_target() <= 0 || cycle == 0) { shortfall = prev_shortfall = target = 0; + gen = wakeups; } else { launder = target / cycle--; goto dolaundry; @@ -1144,7 +1146,6 @@ vm_pageout_laundry_worker(void *arg) */ ninact = vm_cnt.v_inactive_count; nlaundry = vm_cnt.v_laundry_count; - wakeups = VM_METER_PCPU_CNT(v_pdwakeups); if (target == 0 && wakeups != gen && nlaundry * bkgrd_launder_ratio >= ninact) { gen = wakeups;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608171550.u7HFouQV098255>