[perfmon2] [PATCH] perf_events: fix bug in AMD per-cpu initialization

2010-03-24 Thread Stephane Eranian
> Crap, you're right, either notify_cpu_starting() is done too early or > smp_store_cpu_info() is done too late. > > Since smp_store_cpu_info() relies on the result of calibrate_delay() we > can't easily change that order, but since there really isn't any other > CPU_STARTING user in tree (I appea

Re: [perfmon2] [PATCH] perf_events: fix bug in AMD per-cpu initialization

2010-03-23 Thread Stephane Eranian
On Tue, Mar 23, 2010 at 4:18 PM, Peter Zijlstra wrote: > On Tue, 2010-03-23 at 16:12 +0100, Stephane Eranian wrote: >> On Tue, Mar 23, 2010 at 4:07 PM, Peter Zijlstra wrote: >> > On Tue, 2010-03-23 at 15:55 +0100, Stephane Eranian wrote: >> >> What's the point of CPU_ONLINE vs. CPU_STARTING if yo

Re: [perfmon2] [PATCH] perf_events: fix bug in AMD per-cpu initialization

2010-03-23 Thread Peter Zijlstra
On Tue, 2010-03-23 at 16:12 +0100, Stephane Eranian wrote: > On Tue, Mar 23, 2010 at 4:07 PM, Peter Zijlstra wrote: > > On Tue, 2010-03-23 at 15:55 +0100, Stephane Eranian wrote: > >> What's the point of CPU_ONLINE vs. CPU_STARTING if you're saying the > >> former is never right? Why not move CPU_

Re: [perfmon2] [PATCH] perf_events: fix bug in AMD per-cpu initialization

2010-03-23 Thread Stephane Eranian
On Tue, Mar 23, 2010 at 4:07 PM, Peter Zijlstra wrote: > On Tue, 2010-03-23 at 15:55 +0100, Stephane Eranian wrote: >> What's the point of CPU_ONLINE vs. CPU_STARTING if you're saying the >> former is never right? Why not move CPU_ONLINE to the right place and >> drop CPU_STARTING? > > Its right f

Re: [perfmon2] [PATCH] perf_events: fix bug in AMD per-cpu initialization

2010-03-23 Thread Peter Zijlstra
On Tue, 2010-03-23 at 15:55 +0100, Stephane Eranian wrote: > What's the point of CPU_ONLINE vs. CPU_STARTING if you're saying the > former is never right? Why not move CPU_ONLINE to the right place and > drop CPU_STARTING? Its right for a lot of things, just not for perf, we need to be ready and d

Re: [perfmon2] [PATCH] perf_events: fix bug in AMD per-cpu initialization

2010-03-23 Thread Stephane Eranian
On Tue, Mar 23, 2010 at 3:11 PM, Peter Zijlstra wrote: > On Thu, 2010-03-18 at 01:33 +0100, Stephane Eranian wrote: >> On Thu, Mar 18, 2010 at 12:47 AM, Peter Zijlstra >> wrote: >> > On Wed, 2010-03-17 at 10:40 +0200, Stephane Eranian wrote: >> >>       On AMD processors, we need to allocate a d

Re: [perfmon2] [PATCH] perf_events: fix bug in AMD per-cpu initialization

2010-03-23 Thread Peter Zijlstra
On Thu, 2010-03-18 at 01:33 +0100, Stephane Eranian wrote: > On Thu, Mar 18, 2010 at 12:47 AM, Peter Zijlstra wrote: > > On Wed, 2010-03-17 at 10:40 +0200, Stephane Eranian wrote: > >> On AMD processors, we need to allocate a data structure per > >> Northbridge > >> to handle certain

Re: [perfmon2] [PATCH] perf_events: fix bug in AMD per-cpu initialization

2010-03-17 Thread Stephane Eranian
On Thu, Mar 18, 2010 at 12:47 AM, Peter Zijlstra wrote: > On Wed, 2010-03-17 at 10:40 +0200, Stephane Eranian wrote: >>       On AMD processors, we need to allocate a data structure per Northbridge >>       to handle certain events. >> >>       On CPU initialization, we need to query the Northbrid

Re: [perfmon2] [PATCH] perf_events: fix bug in AMD per-cpu initialization

2010-03-17 Thread Peter Zijlstra
On Wed, 2010-03-17 at 10:40 +0200, Stephane Eranian wrote: > On AMD processors, we need to allocate a data structure per Northbridge > to handle certain events. > > On CPU initialization, we need to query the Northbridge id and check > whether the structure is already alloc

[perfmon2] [PATCH] perf_events: fix bug in AMD per-cpu initialization

2010-03-17 Thread Stephane Eranian
On AMD processors, we need to allocate a data structure per Northbridge to handle certain events. On CPU initialization, we need to query the Northbridge id and check whether the structure is already allocated or not. We use the amd_get_nb_id() function to r