Replacement for page fault notifiers?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>
Cc: <jbeulich@...>, <proski@...>
Date: Tuesday, January 8, 2008 - 3:06 pm

Hello,

the commit "x86: optimize page faults like all other achitectures and
kill notifier cruft" by Christoph Hellwig removed the page fault
notifiers (e.g. register_page_fault_notifier()) completely in 2.6.24.
Mmio-trace [1] is using them for tracking memory mapped IO, and also
other people have mentioned they need it [2,3].

This is roughly how I understand mmio-trace is working. In a loadable
kernel module calls to __ioremap() are diverted to an mmio-trace
specific function. The function calls the real __ioremap() and marks
the returned pages as not present. Access to the mapped IO memory
causes a page fault. Mmio-trace's page fault handler marks the page
present, records the event, single-steps the faulting instruction, and
finally marks the page as not present again.

- Is there anything coming to replace register_page_fault_notifier()?
- Has someone found another way to accomplish the same without patching
the kernel?
- Should I start writing a patch to bring back the notifiers, based on
the commit that removed them?

People started to complain to me that mmio-trace does not compile for
2.6.24. At least the Nouveau project is a regular user of mmio-trace
for reverse-engineering, and the tool should be easy to use. Therefore
I would prefer not to force casual contributors to patch their kernels
as it might be too much for some. I am hoping that 2.6.25, if not
2.6.24, would contain a mechanism to accomplish what I need.

I am not a subscriber, so please keep me in CC. Also I CC'd the people
who wrote about the same issue in the past.

Thanks.


[1] http://nouveau.freedesktop.org/wiki/MmioTrace
[2] http://marc.info/?l=linux-kernel&m=119540769014745&w=2
[3] http://article.gmane.org/gmane.linux.kernel/609521

-- 
Pekka Paalanen
http://www.iki.fi/pq/
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Replacement for page fault notifiers?, Pekka Paalanen, (Tue Jan 8, 3:06 pm)
Re: Replacement for page fault notifiers?, Christoph Hellwig, (Tue Jan 8, 4:32 pm)
Re: Replacement for page fault notifiers?, Dave Airlie, (Tue Jan 8, 6:13 pm)
Re: Replacement for page fault notifiers?, Benjamin Herrenschmidt, (Tue Jan 8, 8:26 pm)
Re: Replacement for page fault notifiers?, Pavel Roskin, (Wed Jan 9, 2:18 pm)
Re: Replacement for page fault notifiers?, Christoph Hellwig, (Wed Jan 9, 2:21 pm)
Re: Replacement for page fault notifiers?, Benjamin Herrenschmidt, (Wed Jan 9, 3:58 pm)
Re: Replacement for page fault notifiers?, Pavel Roskin, (Wed Jan 9, 4:24 pm)
Re: Replacement for page fault notifiers?, Christoph Hellwig, (Wed Jan 9, 4:26 pm)
Re: Replacement for page fault notifiers?, Pavel Roskin, (Wed Jan 9, 4:41 pm)
Re: Replacement for page fault notifiers?, Christoph Hellwig, (Wed Jan 9, 4:22 pm)
Re: Replacement for page fault notifiers?, Pekka Paalanen, (Thu Jan 10, 2:44 pm)
Re: Replacement for page fault notifiers?, Arjan van de Ven, (Wed Jan 9, 8:42 pm)
Re: Replacement for page fault notifiers?, Matt Mackall, (Wed Jan 9, 10:03 pm)
Re: Replacement for page fault notifiers?, Pavel Roskin, (Wed Jan 9, 10:21 pm)
Re: Replacement for page fault notifiers?, Matt Mackall, (Wed Jan 9, 10:30 pm)
Re: Replacement for page fault notifiers?, Benjamin Herrenschmidt, (Wed Jan 9, 8:56 pm)
Re: Replacement for page fault notifiers?, Andi Kleen, (Wed Jan 9, 8:47 pm)
Re: Replacement for page fault notifiers?, Arjan van de Ven, (Wed Jan 9, 8:55 pm)
Re: Replacement for page fault notifiers?, Benjamin Herrenschmidt, (Wed Jan 9, 8:58 pm)
Re: Replacement for page fault notifiers?, Andi Kleen, (Wed Jan 9, 9:01 pm)