Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"

2008-01-09 Thread Andi Kleen
> I have been reading about kprobes and one thing particularly bothers me > in the case of mmio-trace. The probe will actually service the page > fault, therefore it should be able force do_page_fault() to return at > the probe point. I could not figure out a way to do that. > > Is it possible

Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"

2008-01-09 Thread Pekka Paalanen
On Wed, 9 Jan 2008 11:41:49 +0100 Ingo Molnar <[EMAIL PROTECTED]> wrote: > i agree. There a few practical complication on x86: the > do_page_fault() function is currently excluded from kprobe probing, > for recursion reasons. handle_mm_fault() can be probed OTOH - but > that does not catch

Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"

2008-01-09 Thread Andi Kleen
> Probing vmalloc faults is _really_ tricky : it also implies that the > handler (let's call it probe) connected to the probe point (marker or > kprobe) should _never_ cause a vmalloc page fault, That is why vmalloc_sync_all() was invented. It might make sense to just call that on kprobe

Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"

2008-01-09 Thread Mathieu Desnoyers
* Ingo Molnar ([EMAIL PROTECTED]) wrote: > > (kprobes folks Cc:-ed) > > * David Miller <[EMAIL PROTECTED]> wrote: > > > From: Christoph Hellwig <[EMAIL PROTECTED]> > > Date: Wed, 9 Jan 2008 08:19:45 +0100 > > > > > On Wed, Jan 09, 2008 at 03:55:20AM +, Dave Airlie wrote: > > > > now

Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"

2008-01-09 Thread Ingo Molnar
* Andi Kleen <[EMAIL PROTECTED]> wrote: > On Wed, Jan 09, 2008 at 07:18:46AM -0800, Arjan van de Ven wrote: > > On Wed, 9 Jan 2008 03:17:37 + (GMT) > > Dave Airlie <[EMAIL PROTECTED]> wrote: > > > > > So all distros with 2.6.24 kernels are useless to mmiotrace I don't > > > see why leaving

Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"

2008-01-09 Thread Andi Kleen
On Wed, Jan 09, 2008 at 07:18:46AM -0800, Arjan van de Ven wrote: > On Wed, 9 Jan 2008 03:17:37 + (GMT) > Dave Airlie <[EMAIL PROTECTED]> wrote: > > > So all distros with 2.6.24 kernels are useless to mmiotrace I don't > > see why leaving things as is until a suitable replacement mechanism >

Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"

2008-01-09 Thread Arjan van de Ven
On Wed, 9 Jan 2008 03:17:37 + (GMT) Dave Airlie <[EMAIL PROTECTED]> wrote: > So all distros with 2.6.24 kernels are useless to mmiotrace I don't > see why leaving things as is until a suitable replacement mechanism > can be used.. you work for a distro.. surely you can convince your own

Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"

2008-01-09 Thread Andi Kleen
> You can set a kprobe on the x86 fault handler to do things like > mmiotrace. That would mean that if the kprobe faults it goes into an endless loop. Most of do_page_fault() is not really safe for kprobes. -Andi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the

Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"

2008-01-09 Thread David Miller
From: Jiri Kosina <[EMAIL PROTECTED]> Date: Wed, 9 Jan 2008 14:19:58 +0100 (CET) > On Tue, 8 Jan 2008, David Miller wrote: > > > You can set a kprobe on the x86 fault handler to do things like > > mmiotrace. > > Currently, on x86, you can not, because: > > fastcall void __kprobes

Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"

2008-01-09 Thread Jiri Kosina
On Tue, 8 Jan 2008, David Miller wrote: > You can set a kprobe on the x86 fault handler to do things like > mmiotrace. Currently, on x86, you can not, because: fastcall void __kprobes do_page_fault( ... ); -- Jiri Kosina -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"

2008-01-09 Thread Ingo Molnar
(kprobes folks Cc:-ed) * David Miller <[EMAIL PROTECTED]> wrote: > From: Christoph Hellwig <[EMAIL PROTECTED]> > Date: Wed, 9 Jan 2008 08:19:45 +0100 > > > On Wed, Jan 09, 2008 at 03:55:20AM +, Dave Airlie wrote: > > > now because Linus said send him a patch to revert regressions rather

Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"

2008-01-09 Thread Jan Beulich
>That change has been in the mainline tree for nearly three months. All >these affected parties have left it until the eve of 2.6.24 to actually >tell us about it. This is causing me sympathy problems :( Not true - I complained about this on Dec 3rd (attached), with the result of not getting a

Re: [PATCH] Revert x86: optimize page faults like all other achitectures and kill notifier cruft

2008-01-09 Thread Jan Beulich
That change has been in the mainline tree for nearly three months. All these affected parties have left it until the eve of 2.6.24 to actually tell us about it. This is causing me sympathy problems :( Not true - I complained about this on Dec 3rd (attached), with the result of not getting a

Re: [PATCH] Revert x86: optimize page faults like all other achitectures and kill notifier cruft

2008-01-09 Thread Ingo Molnar
(kprobes folks Cc:-ed) * David Miller [EMAIL PROTECTED] wrote: From: Christoph Hellwig [EMAIL PROTECTED] Date: Wed, 9 Jan 2008 08:19:45 +0100 On Wed, Jan 09, 2008 at 03:55:20AM +, Dave Airlie wrote: now because Linus said send him a patch to revert regressions rather than just

Re: [PATCH] Revert x86: optimize page faults like all other achitectures and kill notifier cruft

2008-01-09 Thread Jiri Kosina
On Tue, 8 Jan 2008, David Miller wrote: You can set a kprobe on the x86 fault handler to do things like mmiotrace. Currently, on x86, you can not, because: fastcall void __kprobes do_page_fault( ... ); -- Jiri Kosina -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH] Revert x86: optimize page faults like all other achitectures and kill notifier cruft

2008-01-09 Thread David Miller
From: Jiri Kosina [EMAIL PROTECTED] Date: Wed, 9 Jan 2008 14:19:58 +0100 (CET) On Tue, 8 Jan 2008, David Miller wrote: You can set a kprobe on the x86 fault handler to do things like mmiotrace. Currently, on x86, you can not, because: fastcall void __kprobes do_page_fault( ...

Re: [PATCH] Revert x86: optimize page faults like all other achitectures and kill notifier cruft

2008-01-09 Thread Andi Kleen
You can set a kprobe on the x86 fault handler to do things like mmiotrace. That would mean that if the kprobe faults it goes into an endless loop. Most of do_page_fault() is not really safe for kprobes. -Andi -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the

Re: [PATCH] Revert x86: optimize page faults like all other achitectures and kill notifier cruft

2008-01-09 Thread Andi Kleen
On Wed, Jan 09, 2008 at 07:18:46AM -0800, Arjan van de Ven wrote: On Wed, 9 Jan 2008 03:17:37 + (GMT) Dave Airlie [EMAIL PROTECTED] wrote: So all distros with 2.6.24 kernels are useless to mmiotrace I don't see why leaving things as is until a suitable replacement mechanism can be

Re: [PATCH] Revert x86: optimize page faults like all other achitectures and kill notifier cruft

2008-01-09 Thread Ingo Molnar
* Andi Kleen [EMAIL PROTECTED] wrote: On Wed, Jan 09, 2008 at 07:18:46AM -0800, Arjan van de Ven wrote: On Wed, 9 Jan 2008 03:17:37 + (GMT) Dave Airlie [EMAIL PROTECTED] wrote: So all distros with 2.6.24 kernels are useless to mmiotrace I don't see why leaving things as is

Re: [PATCH] Revert x86: optimize page faults like all other achitectures and kill notifier cruft

2008-01-09 Thread Arjan van de Ven
On Wed, 9 Jan 2008 03:17:37 + (GMT) Dave Airlie [EMAIL PROTECTED] wrote: So all distros with 2.6.24 kernels are useless to mmiotrace I don't see why leaving things as is until a suitable replacement mechanism can be used.. you work for a distro.. surely you can convince your own distro

Re: [PATCH] Revert x86: optimize page faults like all other achitectures and kill notifier cruft

2008-01-09 Thread Mathieu Desnoyers
* Ingo Molnar ([EMAIL PROTECTED]) wrote: (kprobes folks Cc:-ed) * David Miller [EMAIL PROTECTED] wrote: From: Christoph Hellwig [EMAIL PROTECTED] Date: Wed, 9 Jan 2008 08:19:45 +0100 On Wed, Jan 09, 2008 at 03:55:20AM +, Dave Airlie wrote: now because Linus said send him

Re: [PATCH] Revert x86: optimize page faults like all other achitectures and kill notifier cruft

2008-01-09 Thread Pekka Paalanen
On Wed, 9 Jan 2008 11:41:49 +0100 Ingo Molnar [EMAIL PROTECTED] wrote: i agree. There a few practical complication on x86: the do_page_fault() function is currently excluded from kprobe probing, for recursion reasons. handle_mm_fault() can be probed OTOH - but that does not catch vmalloc()-ed

Re: [PATCH] Revert x86: optimize page faults like all other achitectures and kill notifier cruft

2008-01-09 Thread Andi Kleen
I have been reading about kprobes and one thing particularly bothers me in the case of mmio-trace. The probe will actually service the page fault, therefore it should be able force do_page_fault() to return at the probe point. I could not figure out a way to do that. Is it possible to do

Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"

2008-01-08 Thread David Miller
From: Christoph Hellwig <[EMAIL PROTECTED]> Date: Wed, 9 Jan 2008 08:19:45 +0100 > On Wed, Jan 09, 2008 at 03:55:20AM +, Dave Airlie wrote: > > now because Linus said send him a patch to revert regressions rather than > > just complain, > > this is not a regression by any definition. You

Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"

2008-01-08 Thread David Miller
From: Christoph Hellwig <[EMAIL PROTECTED]> Date: Wed, 9 Jan 2008 08:17:27 +0100 > NACK. If you want to do it you'll need a much better reason and an > in-tree user. And if you want to redo it it should be available for > all platforms with a consistant API. I majorly NACK this as well, we

Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"

2008-01-08 Thread Christoph Hellwig
On Wed, Jan 09, 2008 at 03:55:20AM +, Dave Airlie wrote: > now because Linus said send him a patch to revert regressions rather than > just complain, this is not a regression by any definition. You were abusing exported symbols for out of tree junk, so you'll lose. -- To unsubscribe from

Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"

2008-01-08 Thread Christoph Hellwig
On Wed, Jan 09, 2008 at 02:34:46AM +, Dave Airlie wrote: > > [This an initial RFC but I'd like to have this patch in before 2.6.24 goes > final as it really breaks this useful feature] > > mmiotrace the MMIO access tracer used to reverse engineer binary blobs > used this notifier interface

Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"

2008-01-08 Thread Andi Kleen
> An alternative might be to come up with something decent and target 2.6.24.x If you want zero cache line cost the only way is to handle that using Mathieu's inline patch infrastructure. Having a generic notifier type based on that would be probably a good idea. -Andi -- To unsubscribe from

Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"

2008-01-08 Thread Dave Airlie
> > An alternative might be to come up with something decent and target 2.6.24.x I don't see mmiotrace getting merged into a stable kernel... how do however see it getting cleaned up for 2.6.25 now that people know how fragile the kernel hooks for it are.. > We put the crappy code back in

Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"

2008-01-08 Thread Andrew Morton
On Wed, 9 Jan 2008 03:17:37 + (GMT) Dave Airlie <[EMAIL PROTECTED]> wrote: > > > On Wed, 9 Jan 2008 02:34:46 + (GMT) Dave Airlie <[EMAIL PROTECTED]> > > wrote: > > > > > > > > [This an initial RFC but I'd like to have this patch in before 2.6.24 > > > goes > > > final as it really

Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"

2008-01-08 Thread Dave Airlie
> On Wed, 9 Jan 2008 02:34:46 + (GMT) Dave Airlie <[EMAIL PROTECTED]> wrote: > > > > > [This an initial RFC but I'd like to have this patch in before 2.6.24 goes > > final as it really breaks this useful feature] > > > > mmiotrace the MMIO access tracer used to reverse engineer binary

Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"

2008-01-08 Thread Andrew Morton
On Wed, 9 Jan 2008 02:34:46 + (GMT) Dave Airlie <[EMAIL PROTECTED]> wrote: > > [This an initial RFC but I'd like to have this patch in before 2.6.24 goes > final as it really breaks this useful feature] > > mmiotrace the MMIO access tracer used to reverse engineer binary blobs > used this

Re: [PATCH] Revert "x86: optimize page faults like all other achitectures and kill notifier cruft"

2008-01-08 Thread Andi Kleen
On Wed, Jan 09, 2008 at 02:34:46AM +, Dave Airlie wrote: > > [This an initial RFC but I'd like to have this patch in before 2.6.24 goes > final as it really breaks this useful feature] > > mmiotrace the MMIO access tracer used to reverse engineer binary blobs > used this notifier interface

Re: [PATCH] Revert x86: optimize page faults like all other achitectures and kill notifier cruft

2008-01-08 Thread Andi Kleen
On Wed, Jan 09, 2008 at 02:34:46AM +, Dave Airlie wrote: [This an initial RFC but I'd like to have this patch in before 2.6.24 goes final as it really breaks this useful feature] mmiotrace the MMIO access tracer used to reverse engineer binary blobs used this notifier interface and is

Re: [PATCH] Revert x86: optimize page faults like all other achitectures and kill notifier cruft

2008-01-08 Thread Andrew Morton
On Wed, 9 Jan 2008 02:34:46 + (GMT) Dave Airlie [EMAIL PROTECTED] wrote: [This an initial RFC but I'd like to have this patch in before 2.6.24 goes final as it really breaks this useful feature] mmiotrace the MMIO access tracer used to reverse engineer binary blobs used this notifier

Re: [PATCH] Revert x86: optimize page faults like all other achitectures and kill notifier cruft

2008-01-08 Thread Andrew Morton
On Wed, 9 Jan 2008 03:17:37 + (GMT) Dave Airlie [EMAIL PROTECTED] wrote: On Wed, 9 Jan 2008 02:34:46 + (GMT) Dave Airlie [EMAIL PROTECTED] wrote: [This an initial RFC but I'd like to have this patch in before 2.6.24 goes final as it really breaks this useful

Re: [PATCH] Revert x86: optimize page faults like all other achitectures and kill notifier cruft

2008-01-08 Thread Dave Airlie
An alternative might be to come up with something decent and target 2.6.24.x I don't see mmiotrace getting merged into a stable kernel... how do however see it getting cleaned up for 2.6.25 now that people know how fragile the kernel hooks for it are.. We put the crappy code back in for

Re: [PATCH] Revert x86: optimize page faults like all other achitectures and kill notifier cruft

2008-01-08 Thread Andi Kleen
An alternative might be to come up with something decent and target 2.6.24.x If you want zero cache line cost the only way is to handle that using Mathieu's inline patch infrastructure. Having a generic notifier type based on that would be probably a good idea. -Andi -- To unsubscribe from

Re: [PATCH] Revert x86: optimize page faults like all other achitectures and kill notifier cruft

2008-01-08 Thread Christoph Hellwig
On Wed, Jan 09, 2008 at 02:34:46AM +, Dave Airlie wrote: [This an initial RFC but I'd like to have this patch in before 2.6.24 goes final as it really breaks this useful feature] mmiotrace the MMIO access tracer used to reverse engineer binary blobs used this notifier interface and is

Re: [PATCH] Revert x86: optimize page faults like all other achitectures and kill notifier cruft

2008-01-08 Thread David Miller
From: Christoph Hellwig [EMAIL PROTECTED] Date: Wed, 9 Jan 2008 08:19:45 +0100 On Wed, Jan 09, 2008 at 03:55:20AM +, Dave Airlie wrote: now because Linus said send him a patch to revert regressions rather than just complain, this is not a regression by any definition. You were

Re: [PATCH] Revert x86: optimize page faults like all other achitectures and kill notifier cruft

2008-01-08 Thread David Miller
From: Christoph Hellwig [EMAIL PROTECTED] Date: Wed, 9 Jan 2008 08:17:27 +0100 NACK. If you want to do it you'll need a much better reason and an in-tree user. And if you want to redo it it should be available for all platforms with a consistant API. I majorly NACK this as well, we don't

Re: [PATCH] Revert x86: optimize page faults like all other achitectures and kill notifier cruft

2008-01-08 Thread Christoph Hellwig
On Wed, Jan 09, 2008 at 03:55:20AM +, Dave Airlie wrote: now because Linus said send him a patch to revert regressions rather than just complain, this is not a regression by any definition. You were abusing exported symbols for out of tree junk, so you'll lose. -- To unsubscribe from