From: Pekka Paalanen <pq@iki.fi>
To: Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org>,
linux-kernel@vger.kernel.org, vegard.nossum@gmail.com,
nouveau@lists.freedesktop.org
Subject: Re: [BUG/PATCH] x86 mmiotrace: dynamically disable non-boot CPUs
Date: Wed, 16 Apr 2008 23:42:09 +0300 [thread overview]
Message-ID: <20080416234209.221b7fae@daedalus.pq.iki.fi> (raw)
In-Reply-To: <20080416183258.GA30490@elte.hu>
On Wed, 16 Apr 2008 20:32:58 +0200
Ingo Molnar <mingo@elte.hu> wrote:
>
> * Pekka Paalanen <pq@iki.fi> wrote:
>
> > > yeah - it looks complex. Not a showstopper for now :-)
> > >
> > > but given that Xorg is usually just a single task, do we _really_
> > > need this?
> >
> > We're not tracing Xorg at all. Mmiotrace still cannot catch accesses
> > originating in user space. It is tracing MMIO accesses from within the
> > kernel, and this means that IRQ services and device syscalls may be
> > accessing the hardware at the same time. Vblank interrupts happen
> > quite often, some GPU commands are actually emulated in kernel via
> > interrupts and whatnot. [...]
>
> ok, understood - i forgot about IRQ generated GPU accesses. In fact UP
> probably generates a more readable trace because DRM accesses from one
> CPU are not mixed up with IRQ completion from another CPU.
In the future, when things get more stable feature-wise, I will revise
the mmiotrace log format. One thing to add is cpu number, which will
then easily separate interleaved operations. Maybe I should also think
about if someone wants to trace things that are not in PCI bus address
space. If kmemcheck and mmiotrace could be unified somehow, it would
be a tool offering uninitialised memory access traps, MMIO tracing and
basically for watching almost any page and recording accesses to that
page. In a time far, far away...
> So i think we need to fix your automatic-cpudown/cpuup patch. I tried
> that and it worked very intuitively and the cpus were disabled/enabled
> without any trouble - with ftrace based mmiotrace we now basically have
> something that most distros could enable by default without thinking
> twice about it.
Without any trouble - you didn't hit the bug I did?
> But if it means an UP kernel has to be used then it will be turned off
> immediately and the barrier to users will be huge again. I really
> envision mmiotrace to be usable by default on _any_ generic distro,
> without rebooting and without any hassle on the user's part.
UP kernel is not mandatory anyway, we just need only one cpu running,
which can be realised by maxcpus=1 kernel argument or hot-un-plugging it
by hand via sysfs.
> the automatic drop-to-single-CPU-when-tracing solution from you is OK -
> it will also test our CPU hotplug primitives some more ;-) And it's not
> like users expect a mmiotraced X session to be particularly fast, right?
They shouldn't, although in my experience X startup is slow but other
things after that work with only a minor slowdown. Btw. when I did that
SMP drop-to-UP tracing test, the resulting log was 63 MB and 'cat' process
was accounted for 24 seconds of cpu time. I will do comparisons some day,
but it sounds a lot. I guess optimising ftrace speed is not yet a
priority :-) (I'm not even sure if it's the framework or mmiotrace.)
> so lets fix those preemptability bugs. They show that the
> cpu-up/cpu-down ops are called from atomic context - it should normally
> be straightforward to sort out - there's no particular reason why the
> ->open()/->close() methods of an ftrace plugin should run in atomic
> context. Steve, any ideas where the atomicity might come from?
Since Steve says it should not be an ftrace issue, I'll dig in it myself.
Might be a weekend job, again. During the week I don't usually fancy
doing anything else than relax and write emails ;-)
Thanks!
--
Pekka Paalanen
http://www.iki.fi/pq/
next prev parent reply other threads:[~2008-04-16 20:42 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080413224207.4430a09c@daedalus.pq.iki.fi>
2008-04-13 19:48 ` [PATCH] mmiotrace: add user documentation Pekka Paalanen
2008-04-14 15:49 ` Steven Rostedt
2008-04-14 18:20 ` Pekka Paalanen
2008-04-13 20:05 ` [BUG/PATCH] x86 mmiotrace: dynamically disable non-boot CPUs Pekka Paalanen
2008-04-14 6:57 ` Ingo Molnar
2008-04-14 18:02 ` Pekka Paalanen
2008-04-16 11:46 ` Ingo Molnar
2008-04-16 17:59 ` Pekka Paalanen
2008-04-16 18:32 ` Ingo Molnar
2008-04-16 19:07 ` Steven Rostedt
2008-04-16 20:42 ` Pekka Paalanen [this message]
2008-04-16 20:47 ` Ingo Molnar
2008-07-24 15:34 ` [Nouveau] " Stephane Marchesin
2008-04-19 15:41 ` [BUG] kmalloc_node(GFP_KERNEL) while smp_alt spinlocked Pekka Paalanen
2008-04-19 16:19 ` [PATCH] Fix SMP alternatives : use mutex instead of spinlock, text_poke is sleepable Mathieu Desnoyers
2008-04-19 21:06 ` Pekka Paalanen
2008-04-19 21:52 ` [BUG] CPU hotplug reboots machine (Re: [PATCH] Fix SMP alternatives : use mutex instead of spinlock, text_poke is sleepable) Pekka Paalanen
2008-04-19 21:58 ` [PATCH] Check for breakpoint in text_poke to eliminate bug_on Mathieu Desnoyers
2008-04-19 22:42 ` Pekka Paalanen
2008-04-20 0:05 ` Mathieu Desnoyers
2008-04-20 7:14 ` Pekka Paalanen
2008-04-20 19:44 ` Mathieu Desnoyers
2008-04-20 20:18 ` Pekka Paalanen
2008-04-20 20:25 ` Mathieu Desnoyers
2008-04-21 18:48 ` [PATCH] x86_64: fix kernel rodata NX setting Pekka Paalanen
2008-04-21 18:57 ` Steven Rostedt
2008-04-21 19:03 ` Ingo Molnar
2008-04-22 18:42 ` [repost PATCH] Fix SMP alternatives : use mutex instead of spinlock, text_poke is sleepable Pekka Paalanen
2008-04-22 19:09 ` Ingo Molnar
2008-04-22 20:22 ` Mathieu Desnoyers
2008-04-24 19:39 ` [PATCH v2] x86 mmiotrace: dynamically disable non-boot CPUs Pekka Paalanen
2008-04-26 11:13 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080416234209.221b7fae@daedalus.pq.iki.fi \
--to=pq@iki.fi \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nouveau@lists.freedesktop.org \
--cc=rostedt@goodmis.org \
--cc=vegard.nossum@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®