Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jun 2019 18:23:30 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
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
Message-ID:  <201906071823.x57INUha098611@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906071823.x57INUha098611>