Date: Sat, 20 Aug 2016 19:12:52 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r304539 - user/alc/PQ_LAUNDRY/sys/vm Message-ID: <201608201912.u7KJCquH098047@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: alc Date: Sat Aug 20 19:12:52 2016 New Revision: 304539 URL: https://svnweb.freebsd.org/changeset/base/304539 Log: Simplify vm_pageout_laundry_worker() a bit. We don't need "shortfall" to be valid across iterations of the main loop. 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 Sat Aug 20 18:52:03 2016 (r304538) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Sat Aug 20 19:12:52 2016 (r304539) @@ -1106,7 +1106,7 @@ vm_pageout_laundry_worker(void *arg) cycle = 0; last_launder = 0; - shortfall = prev_shortfall = 0; + prev_shortfall = 0; target = 0; /* @@ -1146,7 +1146,7 @@ vm_pageout_laundry_worker(void *arg) * pages. Otherwise keep laundering. */ if (vm_laundry_target() <= 0 || cycle == 0) { - shortfall = prev_shortfall = target = 0; + prev_shortfall = target = 0; last_launder = wakeups; } else { launder = target / cycle--; @@ -1215,7 +1215,7 @@ vm_pageout_laundry_worker(void *arg) dolaundry: if (launder > 0) target -= min(vm_pageout_launder(domain, launder, - shortfall > 0), target); + prev_shortfall > 0), target); tsleep(&vm_cnt.v_laundry_count, PVM, "laundr", hz / VM_LAUNDER_INTERVAL);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608201912.u7KJCquH098047>