Re: 64GB NUMA-Q after pgcl

William Lee Irwin III
2003-03-31T22:16:36Z

On Sun, Mar 30, 2003 at 09:22:14PM -0800, William Lee Irwin III wrote:
>> Miscellaneous side effects happen, like follow_page() and
>> get_user_pages() need to return pfn's instead of struct pages.

On Mon, Mar 31, 2003 at 11:02:51PM +0200, Ingo Oeser wrote:
> Hmm, but you know, that users of get_user_pages() play games with
> pages? They need to lock them into memory, mark them eventually
> dirty, map them to a struct scatterlist and much more.
> I worked on an API (I called it the page-walk-api), to make this
> more and more transparent.

There are no changes of semantics, it finds the struct page, does
page_cache_get() and fiddles with the struct page just like before, but
it needs to use the pfn as the handle to the thing when returning it to
the caller, not the struct page pointer.

The caller invariably needs the page structures to do anything, but
it also often needs the subpfn (which pfn inside the area tracked by
the struct page). The pfn is just the most compact way to pass that
information. Things end up doing pfn_to_page() to get at the page
structures that are returned in current mainline, and just use the
low bits of the pfn to reconstruct the offset into the page for copying
and bitblitting and so on.

On Mon, Mar 31, 2003 at 11:02:51PM +0200, Ingo Oeser wrote:
> So if this work will go into 2.6.x, then the page-walk-API will
> be needed, or else the driver writers playing tricks with
> virtual<->physical<->bus address conversions will go nuts.
> So which kernel is the target of this development?

My target for this has always been 2.7; earlier kernels can take
things on at the maintainer's discretion. I expect it to live out
of tree for a substantial amount of time. =(

-- wli