> Date: Tue, 1 Dec 2020 11:08:50 -0300
> From: Martin Pieuchot <[email protected]>
>
> As recently pointed out by jmatthew@ these need the lock as well, ok?
No. These pages are "unmanaged" and therefore they can not be on any
of the page queues and locking those page queues would be pointless.
We probably should adjust the documentation to reflect this.
> Index: uvm/uvm_km.c
> ===================================================================
> RCS file: /cvs/src/sys/uvm/uvm_km.c,v
> retrieving revision 1.137
> diff -u -p -r1.137 uvm_km.c
> --- uvm/uvm_km.c 23 May 2020 06:15:09 -0000 1.137
> +++ uvm/uvm_km.c 1 Dec 2020 14:00:38 -0000
> @@ -291,7 +291,9 @@ uvm_km_pgremove_intrsafe(vaddr_t start,
> pg = PHYS_TO_VM_PAGE(pa);
> if (pg == NULL)
> panic("uvm_km_pgremove_intrsafe: no page");
> + uvm_lock_pageq();
> uvm_pagefree(pg);
> + uvm_unlock_pageq();
> }
> }
>
> @@ -799,7 +801,9 @@ uvm_km_doputpage(struct uvm_km_free_page
> if (freeva)
> uvm_unmap(kernel_map, va, va + PAGE_SIZE);
>
> + uvm_lock_pageq();
> uvm_pagefree(pg);
> + uvm_unlock_pageq();
> return (nextfp);
> }
> #endif /* !__HAVE_PMAP_DIRECT */
>
>