[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about pte_alloc()
>
> hi all,
>
> it appears from the code that pte_alloc() might block since it allocates
> a page table with GFP_KERNEL if the page table doesnt already exist. i
> need to call pte_alloc() at interrupt time. Basically i want to map some
> kernel memory into user space as soon as the device gives me data. will
> there be any problem if i use another version of pte_alloc() which calls
> with GFP_ATOMIC priority?
> Maybe i am completely lost :-)
Why do you want to run the risk of failing in your allocation at intr
time?
A cleaner thing to do is to allocate vma/memory/pagetables at driver
mmap/fcntl time. If you must make the user program fault before your
device will give data (although this synchronization is probably better
done other ways), mark the ptes invalid ... then mark them valid when
you get the data in your intr routine ... of course, you *might* want
to flush tlbs on other processors too in that case.
Kanoj
>
> cheers
> joy
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org. For more info on Linux MM,
> see: http://www.linux.eu.org/Linux-MM/
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/