Date: Sun, 30 Oct 2016 18:33:57 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r308111 - stable/11/sys/vm Message-ID: <201610301833.u9UIXvgq071212@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: alc Date: Sun Oct 30 18:33:57 2016 New Revision: 308111 URL: https://svnweb.freebsd.org/changeset/base/308111 Log: MFC r306712 Make the page daemon's notion of what kind of pass is being performed by vm_pageout_scan() local to vm_pageout_worker(). There is no reason to store the pass in the NUMA domain structure. Modified: stable/11/sys/vm/vm_page.c stable/11/sys/vm/vm_page.h stable/11/sys/vm/vm_pageout.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_page.c ============================================================================== --- stable/11/sys/vm/vm_page.c Sun Oct 30 18:11:35 2016 (r308110) +++ stable/11/sys/vm/vm_page.c Sun Oct 30 18:33:57 2016 (r308111) @@ -395,7 +395,6 @@ vm_page_domain_init(struct vm_domain *vm vmd->vmd_free_count = 0; vmd->vmd_segs = 0; vmd->vmd_oom = FALSE; - vmd->vmd_pass = 0; for (i = 0; i < PQ_COUNT; i++) { pq = &vmd->vmd_pagequeues[i]; TAILQ_INIT(&pq->pq_pl); @@ -3949,14 +3948,12 @@ DB_SHOW_COMMAND(pageq, vm_page_print_pag db_printf("pq_free %d pq_cache %d\n", vm_cnt.v_free_count, vm_cnt.v_cache_count); for (dom = 0; dom < vm_ndomains; dom++) { - db_printf( - "dom %d page_cnt %d free %d pq_act %d pq_inact %d pass %d\n", + db_printf("dom %d page_cnt %d free %d pq_act %d pq_inact %d\n", dom, vm_dom[dom].vmd_page_count, vm_dom[dom].vmd_free_count, vm_dom[dom].vmd_pagequeues[PQ_ACTIVE].pq_cnt, - vm_dom[dom].vmd_pagequeues[PQ_INACTIVE].pq_cnt, - vm_dom[dom].vmd_pass); + vm_dom[dom].vmd_pagequeues[PQ_INACTIVE].pq_cnt); } } Modified: stable/11/sys/vm/vm_page.h ============================================================================== --- stable/11/sys/vm/vm_page.h Sun Oct 30 18:11:35 2016 (r308110) +++ stable/11/sys/vm/vm_page.h Sun Oct 30 18:33:57 2016 (r308111) @@ -226,7 +226,6 @@ struct vm_domain { u_int vmd_free_count; long vmd_segs; /* bitmask of the segments */ boolean_t vmd_oom; - int vmd_pass; /* local pagedaemon pass */ int vmd_oom_seq; int vmd_last_active_scan; struct vm_page vmd_marker; /* marker for pagedaemon private use */ Modified: stable/11/sys/vm/vm_pageout.c ============================================================================== --- stable/11/sys/vm/vm_pageout.c Sun Oct 30 18:11:35 2016 (r308110) +++ stable/11/sys/vm/vm_pageout.c Sun Oct 30 18:33:57 2016 (r308111) @@ -1508,11 +1508,12 @@ static void vm_pageout_worker(void *arg) { struct vm_domain *domain; - int domidx; + int domidx, pass; bool target_met; domidx = (uintptr_t)arg; domain = &vm_dom[domidx]; + pass = 0; target_met = true; /* @@ -1574,9 +1575,9 @@ vm_pageout_worker(void *arg) * and try again later. */ mtx_unlock(&vm_page_queue_free_mtx); - if (domain->vmd_pass > 1) + if (pass > 1) pause("psleep", hz / 2); - domain->vmd_pass++; + pass++; } else { /* * Yes. Sleep until pages need to be reclaimed or @@ -1586,12 +1587,12 @@ vm_pageout_worker(void *arg) &vm_page_queue_free_mtx, PDROP | PVM, "psleep", hz) == 0) { PCPU_INC(cnt.v_pdwakeups); - domain->vmd_pass = 1; + pass = 1; } else - domain->vmd_pass = 0; + pass = 0; } - target_met = vm_pageout_scan(domain, domain->vmd_pass); + target_met = vm_pageout_scan(domain, pass); } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610301833.u9UIXvgq071212>