Subject: Re: UVM - Kernel & User access question
To: Kamal R Prasad <kamalrpr@in.ibm.com>
From: Eric Circlaeys <circlaeys.e@euro.apple.com>
List: tech-kern
Date: 10/24/2003 20:31:19
Yes!
That's it, I would like to allocate/deallocate massive memory in kernel 
space,
so I cannot use anymore malloc/free methods in the kernel but a 
pageable malloc inside the kernel...

It seems to work well now,
but the deallocate side seems to have some issues, because sometimes 
the system/user applications crash for uvm* reasons...

All the best,
Eric,

On 20 oct. 03, at 16:29, Kamal R Prasad wrote:

>> uvm_fault_wire can be used to wire the pages and you can then use
> anything
>> to access the memory and even use it in a an interrupt context.
>> (uvm_fault_unwire removes the wiring)
>> Once the page is wired you no longer have to worry about page faults.
>> However wiring/unwiring is a relative expensive function.
>
>> kcopy/copyin/copyout can be used without first wiring the pages 
>> because
>> of their internal exception handling.
>> ( However these functions can not be used from interrupt context)
>
> Wouldn't you want to provide a pageable_malloc() inside the kernel?
> Its a really useful interface to have [for those who are naive].
>
> regards
> -kamal
>
>
>
>