From owner-svn-src-head@freebsd.org Fri Jun 7 18:23:33 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1C3A15B3BDC; Fri, 7 Jun 2019 18:23:33 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 01BF684E89; Fri, 7 Jun 2019 18:23:33 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CAE3A7CB4; Fri, 7 Jun 2019 18:23:32 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x57INWAC098623; Fri, 7 Jun 2019 18:23:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x57INUha098611; Fri, 7 Jun 2019 18:23:30 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201906071823.x57INUha098611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 7 Jun 2019 18:23:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348785 - in head/sys: amd64/amd64 arm/arm arm/nvidia/drm2 compat/linuxkpi/common/src dev/drm2/ttm dev/ti dev/xen/gntdev i386/i386 mips/mips riscv/riscv vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: amd64/amd64 arm/arm arm/nvidia/drm2 compat/linuxkpi/common/src dev/drm2/ttm dev/ti dev/xen/gntdev i386/i386 mips/mips riscv/riscv vm X-SVN-Commit-Revision: 348785 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 01BF684E89 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jun 2019 18:23:33 -0000 Author: markj Date: Fri Jun 7 18:23:29 2019 New Revision: 348785 URL: https://svnweb.freebsd.org/changeset/base/348785 Log: Replace uses of vm_page_unwire(m, PQ_NONE) with vm_page_unwire_noq(m). These calls are not the same in general: the former will dequeue the page if it is enqueued, while the latter will just leave it alone. But, all existing uses of the former apply to unmanaged pages, which are never enqueued in the first place. No functional change intended. Reviewed by: kib MFC after: 1 week Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20470 Modified: head/sys/amd64/amd64/pmap.c head/sys/arm/arm/pmap-v6.c head/sys/arm/nvidia/drm2/tegra_bo.c head/sys/compat/linuxkpi/common/src/linux_page.c head/sys/dev/drm2/ttm/ttm_page_alloc.c head/sys/dev/ti/if_ti.c head/sys/dev/xen/gntdev/gntdev.c head/sys/i386/i386/pmap.c head/sys/mips/mips/pmap.c head/sys/riscv/riscv/pmap.c head/sys/vm/uma_core.c head/sys/vm/vm_glue.c head/sys/vm/vm_kern.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Jun 7 18:01:29 2019 (r348784) +++ head/sys/amd64/amd64/pmap.c Fri Jun 7 18:23:29 2019 (r348785) @@ -4081,7 +4081,7 @@ free_pv_chunk(struct pv_chunk *pc) /* entire chunk is free, return it */ m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); dump_drop_page(m->phys_addr); - vm_page_unwire(m, PQ_NONE); + vm_page_unwire_noq(m); vm_page_free(m); } Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Fri Jun 7 18:01:29 2019 (r348784) +++ head/sys/arm/arm/pmap-v6.c Fri Jun 7 18:23:29 2019 (r348785) @@ -2973,7 +2973,7 @@ free_pv_chunk(struct pv_chunk *pc) /* entire chunk is free, return it */ m = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)pc)); pmap_qremove((vm_offset_t)pc, 1); - vm_page_unwire(m, PQ_NONE); + vm_page_unwire_noq(m); vm_page_free(m); pmap_pte2list_free(&pv_vafree, (vm_offset_t)pc); } Modified: head/sys/arm/nvidia/drm2/tegra_bo.c ============================================================================== --- head/sys/arm/nvidia/drm2/tegra_bo.c Fri Jun 7 18:01:29 2019 (r348784) +++ head/sys/arm/nvidia/drm2/tegra_bo.c Fri Jun 7 18:23:29 2019 (r348785) @@ -67,7 +67,7 @@ tegra_bo_destruct(struct tegra_bo *bo) cdev_pager_free_page(bo->cdev_pager, m); vm_page_lock(m); m->flags &= ~PG_FICTITIOUS; - vm_page_unwire(m, PQ_NONE); + vm_page_unwire_noq(m); vm_page_free(m); vm_page_unlock(m); } Modified: head/sys/compat/linuxkpi/common/src/linux_page.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_page.c Fri Jun 7 18:01:29 2019 (r348784) +++ head/sys/compat/linuxkpi/common/src/linux_page.c Fri Jun 7 18:23:29 2019 (r348785) @@ -317,7 +317,7 @@ linux_shmem_read_mapping_page_gfp(vm_object_t obj, int rv = vm_pager_get_pages(obj, &page, 1, NULL, NULL); if (rv != VM_PAGER_OK) { vm_page_lock(page); - vm_page_unwire(page, PQ_NONE); + vm_page_unwire_noq(page); vm_page_free(page); vm_page_unlock(page); VM_OBJECT_WUNLOCK(obj); Modified: head/sys/dev/drm2/ttm/ttm_page_alloc.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_page_alloc.c Fri Jun 7 18:01:29 2019 (r348784) +++ head/sys/dev/drm2/ttm/ttm_page_alloc.c Fri Jun 7 18:23:29 2019 (r348785) @@ -137,7 +137,7 @@ ttm_vm_page_free(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("ttm got unmanaged %p", m)); m->flags &= ~PG_FICTITIOUS; m->oflags |= VPO_UNMANAGED; - vm_page_unwire(m, PQ_NONE); + vm_page_unwire_noq(m); vm_page_free(m); } Modified: head/sys/dev/ti/if_ti.c ============================================================================== --- head/sys/dev/ti/if_ti.c Fri Jun 7 18:01:29 2019 (r348784) +++ head/sys/dev/ti/if_ti.c Fri Jun 7 18:23:29 2019 (r348785) @@ -1623,7 +1623,7 @@ ti_newbuf_jumbo(struct ti_softc *sc, int idx, struct m } sf[i] = sf_buf_alloc(frame, SFB_NOWAIT); if (sf[i] == NULL) { - vm_page_unwire(frame, PQ_NONE); + vm_page_unwire_noq(frame); vm_page_free(frame); device_printf(sc->ti_dev, "buffer allocation " "failed -- packet dropped!\n"); Modified: head/sys/dev/xen/gntdev/gntdev.c ============================================================================== --- head/sys/dev/xen/gntdev/gntdev.c Fri Jun 7 18:01:29 2019 (r348784) +++ head/sys/dev/xen/gntdev/gntdev.c Fri Jun 7 18:23:29 2019 (r348785) @@ -278,7 +278,7 @@ gref_list_dtor(struct cleanup_data_struct *cleanup_dat continue; gnttab_free_grant_reference(gref->gref_id); } - vm_page_unwire(gref->page, PQ_NONE); + vm_page_unwire_noq(gref->page); vm_page_free(gref->page); gref->page = NULL; } Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Fri Jun 7 18:01:29 2019 (r348784) +++ head/sys/i386/i386/pmap.c Fri Jun 7 18:23:29 2019 (r348785) @@ -2465,7 +2465,7 @@ free_pv_chunk(struct pv_chunk *pc) /* entire chunk is free, return it */ m = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)pc)); pmap_qremove((vm_offset_t)pc, 1); - vm_page_unwire(m, PQ_NONE); + vm_page_unwire_noq(m); vm_page_free(m); pmap_ptelist_free(&pv_vafree, (vm_offset_t)pc); } Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Fri Jun 7 18:01:29 2019 (r348784) +++ head/sys/mips/mips/pmap.c Fri Jun 7 18:23:29 2019 (r348785) @@ -1591,7 +1591,7 @@ free_pv_chunk(struct pv_chunk *pc) /* entire chunk is free, return it */ m = PHYS_TO_VM_PAGE(MIPS_DIRECT_TO_PHYS((vm_offset_t)pc)); dump_drop_page(m->phys_addr); - vm_page_unwire(m, PQ_NONE); + vm_page_unwire_noq(m); vm_page_free(m); } Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Fri Jun 7 18:01:29 2019 (r348784) +++ head/sys/riscv/riscv/pmap.c Fri Jun 7 18:23:29 2019 (r348785) @@ -1648,7 +1648,7 @@ free_pv_chunk(struct pv_chunk *pc) /* entire chunk is free, return it */ m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); dump_drop_page(m->phys_addr); - vm_page_unwire(m, PQ_NONE); + vm_page_unwire_noq(m); vm_page_free(m); } Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Fri Jun 7 18:01:29 2019 (r348784) +++ head/sys/vm/uma_core.c Fri Jun 7 18:23:29 2019 (r348785) @@ -1279,9 +1279,9 @@ pcpu_page_alloc(uma_zone_t zone, vm_size_t bytes, int zkva += PAGE_SIZE; } return ((void*)addr); - fail: +fail: TAILQ_FOREACH_SAFE(p, &alloctail, listq, p_next) { - vm_page_unwire(p, PQ_NONE); + vm_page_unwire_noq(p); vm_page_free(p); } return (NULL); @@ -1331,7 +1331,7 @@ noobj_alloc(uma_zone_t zone, vm_size_t bytes, int doma * exit. */ TAILQ_FOREACH_SAFE(p, &alloctail, listq, p_next) { - vm_page_unwire(p, PQ_NONE); + vm_page_unwire_noq(p); vm_page_free(p); } return (NULL); @@ -1392,7 +1392,7 @@ pcpu_page_free(void *mem, vm_size_t size, uint8_t flag for (curva = sva; curva < sva + size; curva += PAGE_SIZE) { paddr = pmap_kextract(curva); m = PHYS_TO_VM_PAGE(paddr); - vm_page_unwire(m, PQ_NONE); + vm_page_unwire_noq(m); vm_page_free(m); } pmap_qremove(sva, size >> PAGE_SHIFT); Modified: head/sys/vm/vm_glue.c ============================================================================== --- head/sys/vm/vm_glue.c Fri Jun 7 18:01:29 2019 (r348784) +++ head/sys/vm/vm_glue.c Fri Jun 7 18:23:29 2019 (r348785) @@ -408,7 +408,7 @@ vm_thread_stack_dispose(vm_object_t ksobj, vm_offset_t if (m == NULL) panic("vm_thread_dispose: kstack already missing?"); vm_page_lock(m); - vm_page_unwire(m, PQ_NONE); + vm_page_unwire_noq(m); vm_page_free(m); vm_page_unlock(m); } Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Fri Jun 7 18:01:29 2019 (r348784) +++ head/sys/vm/vm_kern.c Fri Jun 7 18:23:29 2019 (r348785) @@ -586,7 +586,7 @@ _kmem_unback(vm_object_t object, vm_offset_t addr, vm_ #endif for (; offset < end; offset += PAGE_SIZE, m = next) { next = vm_page_next(m); - vm_page_unwire(m, PQ_NONE); + vm_page_unwire_noq(m); vm_page_free(m); } VM_OBJECT_WUNLOCK(object);