lkml.org 
[lkml]   [2006]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: get_user_pages ?
Date
On Apr 21, 2006, at 7:29 AM, Mark Hounschell wrote:

> You've looked at the code some obviously. What is in my future WRT
> these
> changes being made that you referenced above and the depreciation of
> some of the calls in use. Given my situation, do you foresee anything
> that will keep me from being able to get valid bus addresses for my
> pte?

Who can predict the future? I ran into similar issues and took a
different approach. Our application was using a large amount of
shared memory and it must be contiguous and the physical addresses
must be known, but only fixed for a particular invocation of the
system. I switched to using huge pages.

So, during boot I have a small program that creates a file in the
hugetlbfs, mmaps it and then makes an ioctl call to my driver that
faults in all of the pages in the region mmapped. The driver takes
all of the huge pages from the system, sorts them in physical order
and then faults them in in a contiguous range by calling
get_user_pages, freeing one huge page before each call to get_user-
pages. I use page_to_phys to get the physical address.

This approach means that my code is not manipulating the vm at all.
This should make future kernel changes easier to adapt to.

What I am doing would be utter madness to attempt with normal pages,
because there is so much activity with them, but huge pages are much
more manageable particularly during a boot sequence.

--
Mark Rustad, MRustad@mac.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-21 16:55    [W:0.055 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site