Libor Michalek wrote:
I've seen the problem in test cases, so it definetly can happen in 2.4.
Looking at the 2.6 code the problem appears to be fixed, but I have not
had a chance to run tests to verify it. Good place to take look if you are interested is in launder_page() and try_to_unmap() in the kernel.
I'm afraid it has not been fixed in 2.6. I just ran our memory locking tests, and it failed with get_user_pages running on Suse Linux 9.1 (kernel 2.6.4).
The test app does this:
1) Calls our driver, which issues a get_user_pages() call for one page. 2) Using pgd/pmd/pte_offset, gets the physical address for the page 3) Tries allocate 1GB of memory (this system has 1GB of physical RAM). 4) Tries to get the physical address again.
In step 4, the physical address is often zero, which means either pgd_offset or pmd_offset failed. This indicates the page was swapped out.
I don't understand how this bug can continue to exist after all this time. get_user_pages() is supposed to lock the memory, because drivers use it for DMA'ing directly into user memory.
-- Timur Tabi Staff Software Engineer [EMAIL PROTECTED] _______________________________________________ openib-general mailing list [EMAIL PROTECTED] http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
