Re: Replacement for page fault notifiers?

Benjamin Herrenschmidt
2008-01-10T00:59:38Z

On Wed, 2008-01-09 at 16:55 -0800, Arjan van de Ven wrote:
> > That would assume that your mmio area has a struct page. In most
> PCs
> > the ones in the PCI hole don't
> >
>
> so you also call the function for all traps on pages without struct
> page;
> that should be extremely rare anyway, and the mmio_trace code can
> then
> look the page up.

Not that rare if you use a modern DRI :-)

In fact, the thing here is that it's mostly kernel mappings though, not
user mappings. So we never get there, we die before we even reach
generic code most of the time iirc.

The whole ioremap stuff is very platform specific, not everybody even
uses the code in mm/vmalloc.c for it, so at this stage, I see no other
option but a hook in do_page_fault().

Cheers,
Ben.