Re: [rfc] 2.6.19-rc1-git5: consolidation of file backed fault handlers

From: Nick Piggin
Date: Mon Oct 09 2006 - 20:59:43 EST


Benjamin Herrenschmidt wrote:
On Tue, 2006-10-10 at 06:57 +1000, Benjamin Herrenschmidt wrote:

On Mon, 2006-10-09 at 18:12 +0200, Nick Piggin wrote:

OK, I've cleaned up and further improved this patchset, removed duplication
while retaining legacy nopage handling, restored page_mkwrite to the ->fault
path (due to lack of users upstream to attempt a conversion), converted the
rest of the filesystems to use ->fault, restored MAP_POPULATE and population
of remap_file_pages pages, replaced nopfn completely, and removed
NOPAGE_REFAULT because that can be done easily with ->fault.

What is the replacement ?


I see ... so we now use PTR_ERR to return errors and NULL for refault...
good for me but Andrew may want more...

The fault handler puts its desired return type into fault_data.type, and
returns NULL if there is no page to install, otherwise the pointer to
the struct page.

So you'd just set VM_FAULT_MINOR and return NULL, after doing the
vm_insert_pfn thing.

--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/