Ed L Cashin wrote:
The normal order of lock acquisition is first to get the mmap semaphore (at which point you may sleep) and then to get the page table lock.
So you're saying I need to use
down_read(¤t->mm->mmap_sem); ... up_read(¤t->mm->mmap_sem);
In addition to the spinlocks?
A good reference for the proceedure you're implementing is follow_page in mm/memory.c. Note that it's called with the page_table_lock held.
I'm looking at follow_page() in 2.6.6, and I don't see any spinlock or semaphore code. The code in RedHat 9.0 is also similar in this respect.
No, the page table lock allows you to see a consistent view of the
page tables while you hold it.
Is "¤t->mm->page_table_lock" the right parameter to use in this case?
-- Timur Tabi Staff Software Engineer timur.tabi@ammasso.com
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/