Subject: uvm_loan() question
To: None <email@example.com>
From: Jaromír <firstname.lastname@example.org>
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
Is it okay to do 4., 5. in this order? (experiment seems to indicate so)
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 <jdolecek@NetBSD.org> http://www.ics.muni.cz/~dolecek/
NetBSD - just plain best OS! -=*=- Got spare MCA cards or docs? Hand me them!