Re: Replacement for page fault notifiers?

Arjan van de Ven
2008-01-10T00:43:19Z

On Wed, 9 Jan 2008 20:22:54 +0000
Christoph Hellwig <hch@infradead.org> wrote:

> On Thu, Jan 10, 2008 at 06:58:23AM +1100, Benjamin Herrenschmidt
> wrote:
> > It's a sane thing to do, Christoph, I don't think it's a
> > unreasonable request to put the hooks back in.
>
> As said a few times before there's simply no way we're going to put
> exactly that crap back. For one the patch removed a whole lot of
> crud from the kprobes code that simply isn't going to come back just
> because there are some pagefault notifiers. Second the page fault
> notifiers were horribly implemented and quite inefficient. And third
> we're not going to put something in just for out of tree code.
>

I'm btw all in favor of making mmio tracing full fledged kernel infrastructure.
This doesn't mean "notifier" imo; this means a real flag in the struct page,
and then the page fault code can do

if (page->flags & FLAG_MMIO_TRACED)
mmio_trace(page, regs, whatever..);

(probably surrounded by a CONFIG_ ifdef)
THis is a TON lighter than a notifier chain, and actually what you want,
you don't really want a notifier, you want a call back when a special kind of
page is touched.

--
If you want to reach me at my work email, use arjan@linux.intel.com
For development, discussion and tips for power savings,
visit http://www.lesswatts.org