[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081204185002.5faded25@infradead.org>
Date: Thu, 4 Dec 2008 18:50:02 -0800
From: Arjan van de Ven <arjan@...radead.org>
To: David Miller <davem@...emloft.net>
Cc: paulus@...ba.org, tglx@...utronix.de, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org, akpm@...ux-foundation.org,
mingo@...e.hu, eranian@...glemail.com, dada1@...mosbay.com,
robert.richter@....com, hpa@...or.com, a.p.zijlstra@...llo.nl,
rostedt@...dmis.org
Subject: Re: [patch 2/3] performance counters: documentation
On Thu, 04 Dec 2008 16:37:41 -0800 (PST)
David Miller <davem@...emloft.net> wrote:
> From: Paul Mackerras <paulus@...ba.org>
> Date: Fri, 5 Dec 2008 11:33:31 +1100
>
> > This is going to be a huge problem, at least on powerpc, because it
> > means that the kernel will have to know which events can be counted
> > on which counters and what values need to be put in the control
> > registers to select them.
>
> Sparc64 is the same.
>
> > The situation will be even worse with POWER5 and POWER6, where the
> > event selection logic is very complex, with multiple layers of
> > multiplexers. I really really don't want the kernel to have to know
> > about all that.
>
> Niagara2 has deep multiplexing and sub-event masking too.
>
> I really appreciated how perfmon kept all of those details
> in userspace.
I would like to respectfully disagree with this some. The kernel needs
to abstract hardware to some degree for userspace. The problem in this
case is that userspace can't really do a better job, in fact it can
only do a worse job since it lacks the coordination capability of
knowing it has full control of all the hardware registers.
I am sure the corner cases you're talking about are nasty, I just don't
think they are less nasty when dealt with in userspace. Sure the kernel
might be simpler, but the system as a whole sure is not.
--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists