Re: [BUG/PATCH] x86 mmiotrace: dynamically disable non-boot CPUs

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Pekka Paalanen
Date: Monday, April 14, 2008 - 11:02 am

On Mon, 14 Apr 2008 08:57:13 +0200
Ingo Molnar <mingo@elte.hu> wrote:


Great, thanks.


Ok, how do you propose we solve this?

I have asked the question before, and then I had two ideas. Well, the
first one was actually your idea (so I hear) to solve the same problem for
kmemcheck.
- per-cpu page tables
- instead of single-stepping, emulate the faulting instruction and never
disarm pages during tracing. (Use and modify code from KVM.)

I don't believe either of these is easy or fast to implement. Given some
months, I might be able to achieve emulation. Page tables are still
magic to me.


Ooh, that sounds like a neat interface. I like it. I've been
half-thinking of different ways of specifying the set of devices to
trace, but none of them was particularly nice.
This feature is for post-2.6.26, right?

Ok, so first select mmiotrace tracer, at which point those sysfs files
appear, but mmiotrace is not activated yet. Then, when any of the
device specific files, or the global file in debugfs, is opened,
mmiotrace activates. And if the file is closed, mmiotrace deactivates.
Should we support several "cats" at the same time?


Hmm, it should not be... I have to double-check, but all the other code,
too, from where enter_uniprocessor() is called, may sleep. The first thing
the caller does is to acquire a mutex, which I assume would complain
loudly if spinlocked or irq-disabled.

Ingo, thank you for fixing this patch, though I'd like to suggest to
leave it out for now, since there clearly are worse problems with it
than without it. And if we can solve the SMP issue, this is not needed.
For the time being we can just instruct users to disable all but one CPU
when try want to trace.


Thanks.

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

Messages in current thread:
Re: [BUG/PATCH] x86 mmiotrace: dynamically disable non-boo ..., Pekka Paalanen, (Mon Apr 14, 11:02 am)
[BUG] kmalloc_node(GFP_KERNEL) while smp_alt spinlocked, Pekka Paalanen, (Sat Apr 19, 8:41 am)
[PATCH] Fix SMP alternatives : use mutex instead of spinlo ..., Mathieu Desnoyers, (Sat Apr 19, 9:19 am)
[PATCH] Check for breakpoint in text_poke to eliminate bug_on, Mathieu Desnoyers, (Sat Apr 19, 2:58 pm)
Re: [PATCH] Check for breakpoint in text_poke to eliminate ..., Mathieu Desnoyers, (Sat Apr 19, 5:05 pm)
Re: [PATCH] Check for breakpoint in text_poke to eliminate ..., Mathieu Desnoyers, (Sun Apr 20, 12:44 pm)
Re: [PATCH] Check for breakpoint in text_poke to eliminate ..., Mathieu Desnoyers, (Sun Apr 20, 1:25 pm)
[PATCH] x86_64: fix kernel rodata NX setting, Pekka Paalanen, (Mon Apr 21, 11:48 am)
Re: [PATCH] x86_64: fix kernel rodata NX setting, Steven Rostedt, (Mon Apr 21, 11:57 am)
Re: [PATCH] x86_64: fix kernel rodata NX setting, Ingo Molnar, (Mon Apr 21, 12:03 pm)
Re: [repost PATCH] Fix SMP alternatives : use mutex instea ..., Mathieu Desnoyers, (Tue Apr 22, 1:22 pm)
[PATCH v2] x86 mmiotrace: dynamically disable non-boot CPUs, Pekka Paalanen, (Thu Apr 24, 12:39 pm)
Re: [Nouveau] [BUG/PATCH] x86 mmiotrace: dynamically disab ..., Stephane Marchesin, (Thu Jul 24, 8:34 am)