Re: [patch 3/3] mm: fault handler to replace nopage and populate

From: Nick Piggin
Date: Sat Oct 07 2006 - 22:17:43 EST


Jeff Garzik wrote:

That's pretty nice.

Back when I was writing [the now slated for death] sound/oss/via82xxx_audio.c driver, Linus suggested that I implement ->nopage() for accessing the mmap'able DMA'd audio buffers, rather than using remap_pfn_range(). It worked out very nicely, because it allowed the sound driver to retrieve $N pages for the mmap'able buffer (passed as an s/g list to the hardware) rather than requiring a single humongous buffer returned by pci_alloc_consistent().

And although probably not your primary motivation, your change does IMO improve this area of the kernel.


Thanks. Yeah hopefully this provides a little more flexibility (I think it can
already replace 3 individual vm_ops callbacks!). And I'd like to see what other
things it can be used for... :)

However, what we don't want is a bloating of struct fault_data IMO. So I'd like
to try to nail down the fields that it needs quite quickly then really keep a
lid on it.

--

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/