Subject: uvm_loan() question
To: None <>
From: Jaromír <>
List: tech-kern
Date: 06/29/2001 00:33:57

I have couple of (supposedly fairly naive) questions.

I'd like to know if following is okay (haven't looked yet):

1. allocate kva
2. uvm_loan() some pages
3. pmap_enter() them to the kva

now when we end using the address space,

4. uvm_unloan() the pages
5. uvm_km_free() the kva

Question one:
Is it okay to do 4., 5. in this order? (experiment seems to indicate so)

Question two:
Is the step 4. actually necessary ? Would uvm_km_free() "unloan" the
associated pages for me automatically?

I've recently encountered condition in newpipe when uvm_km_free()
would be called prior to uvm_unloan() of the pages, and that would
cause a kernel panic. When I call uvm_unloan() and then uvm_km_free()
for appropriate kva, it seems to work.

Jaromir Dolecek <>
NetBSD - just plain best OS! -=*=- Got spare MCA cards or docs? Hand me them!