[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101126071325.GD7893@linux-sh.org>
Date: Fri, 26 Nov 2010 16:13:25 +0900
From: Paul Mundt <lethal@...ux-sh.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...e.hu>, Lin Ming <ming.m.lin@...el.com>,
Stephane Eranian <eranian@...gle.com>,
"robert.richter" <robert.richter@....com>,
Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
fweisbec <fweisbec@...il.com>, paulus <paulus@...ba.org>,
Greg Kroah-Hartman <gregkh@...e.de>,
Kay Sievers <kay.sievers@...y.org>,
"H. Peter Anvin" <hpa@...or.com>,
Kyle Moffett <kyle@...fetthome.net>,
linux-kernel@...r.kernel.org, davem <davem@...emloft.net>,
Michael Cree <mcree@...on.net.nz>,
Deng-Cheng Zhu <dengcheng.zhu@...il.com>,
Will Deacon <will.deacon@....com>,
Don Zickus <dzickus@...hat.com>,
Jason Wessel <jason.wessel@...driver.com>
Subject: Re: [RFC][PATCH 2/8] perf, arch: Use early_initcall() for all arch pmu implementations
On Thu, Nov 25, 2010 at 06:55:59PM +0100, Peter Zijlstra wrote:
> On Thu, 2010-11-25 at 11:25 +0100, Peter Zijlstra wrote:
> >
> > Right, so hw perf init happens from (after this patch):
> >
> > arch_initcall: powerpc, arm, sh, mips
> > early_initcall: x86, sparc, alpha
> >
> >
> > Now the problem is that the generic watchdog code (kernel/watchdog.c)
> > tries to create hw perf events, and that too runs from early_initcall.
> >
> > So my question is, how do we go about curing this, because powerpc, arm,
> > sh and mips are too late and the rest depends on link order to work, not
> > really a nice situation.
> >
> > There's two categories of solutions:
> > - move the watchdog later, and
> > - move the hw perf init earlier.
> >
> > The former is undesired because we want the watchdog as early as
> > possible, the later needs new infrastructure (also, I don't know if the
> > arch implementations can actually run this early).
> >
> > So do I create a perf_initcall() or is there another solution that
> > avoids things like calling the watchdog code from all arch init code?
>
> So the perf_event_init() site is _waaay_ to early to init stuff.. I
> guess I'll move it all to early_initcall() and I'll move the watchdog to
> an explicit call right after it.
>
> Something like the below,.. now I guess the question to all of you is,
> can your arch pmu code cope with early_initcall() or does it need to be
> some other place?
>
Any of the initcall levels are ok for SH at least. The only dependency we
have for the perf code is the clock framework, which comes up during
time_init().
--
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