Index | Thread | Search

From:
Mark Kettenis <mark.kettenis@xs4all.nl>
Subject:
Re: Reaper vs KERNEL_LOCK()
To:
Martin Pieuchot <mpi@grenadille.net>
Cc:
tech@openbsd.org
Date:
Sun, 03 Nov 2024 13:01:54 +0100

Download raw body.

Thread
> Date: Sun, 3 Nov 2024 09:58:45 +0100
> From: Martin Pieuchot <mpi@grenadille.net>
> 
> uvm_fault_unwire_locked() is safe to be called w/o KERNEL_LOCK() the
> vm_map lock is enough.
> 
> ok?

ok kettenis@

> Index: uvm/uvm_map.c
> ===================================================================
> RCS file: /cvs/src/sys/uvm/uvm_map.c,v
> diff -u -p -r1.333 uvm_map.c
> --- uvm/uvm_map.c	31 Oct 2024 05:00:00 -0000	1.333
> +++ uvm/uvm_map.c	3 Nov 2024 08:11:20 -0000
> @@ -1856,10 +1856,8 @@ uvm_unmap_kill_entry_withlock(struct vm_
>  {
>  	/* Unwire removed map entry. */
>  	if (VM_MAPENT_ISWIRED(entry)) {
> -		KERNEL_LOCK();
>  		entry->wired_count = 0;
>  		uvm_fault_unwire_locked(map, entry->start, entry->end);
> -		KERNEL_UNLOCK();
>  	}
>  
>  	if (needlock)
> 
>