Re: [perfmon2] [PATCH percpu#for-next] percpu: clear memory allocated with the km allocator

2010-09-10 Thread Tejun Heo
On 09/10/2010 06:45 PM, Ingo Molnar wrote: > > * Randy Dunlap wrote: > >> On Fri, 10 Sep 2010 10:55:18 +0200 Peter Zijlstra wrote: >> >>> On Fri, 2010-09-10 at 10:52 +0200, Tejun Heo wrote: Percpu allocator should clear memory before returning it but the km allocator forgot to do it.

Re: [perfmon2] [PATCH percpu#for-next] percpu: clear memory allocated with the km allocator

2010-09-10 Thread Ingo Molnar
* Randy Dunlap wrote: > On Fri, 10 Sep 2010 10:55:18 +0200 Peter Zijlstra wrote: > > > On Fri, 2010-09-10 at 10:52 +0200, Tejun Heo wrote: > > > Percpu allocator should clear memory before returning it but the km > > > allocator forgot to do it. Fix it. > > > > > > Signed-off-by: Tejun Heo >

Re: [perfmon2] [PATCH] perf_events: fix BTS interrupt handling to avoid being dazed by NMI (v2)

2010-09-10 Thread Don Zickus
On Fri, Sep 10, 2010 at 01:28:01PM +0200, Stephane Eranian wrote: > Fix a bug introduced with commit de725de and the change in the meaning of the > return value of intel_pmu_handle_irq(). With the current code, when you are > using the BTS, you get 'dazed by NMI' each time the BTS buffer fills up.

[perfmon2] [PATCH] perf_events: fix BTS interrupt handling to avoid being dazed by NMI (v2)

2010-09-10 Thread Stephane Eranian
Fix a bug introduced with commit de725de and the change in the meaning of the return value of intel_pmu_handle_irq(). With the current code, when you are using the BTS, you get 'dazed by NMI' each time the BTS buffer fills up. BTS does interrupt on the PMU vector, thus NMI. You need to take this i

Re: [perfmon2] [PATCH] perf_events: fix BTS interrupt handling to avoid being dazed by NMI

2010-09-10 Thread Stephane Eranian
Sorry, my patch is missing one piece. I will repost. On Fri, Sep 10, 2010 at 1:09 PM, Stephane Eranian wrote: > Fix a bug introduced with commit de725de and the change in the meaning of the > return value of intel_pmu_handle_irq(). With the current code, when you are > using the BTS, you get 'da

[perfmon2] [PATCH] perf_events: fix BTS interrupt handling to avoid being dazed by NMI

2010-09-10 Thread Stephane Eranian
Fix a bug introduced with commit de725de and the change in the meaning of the return value of intel_pmu_handle_irq(). With the current code, when you are using the BTS, you get 'dazed by NMI' each time the BTS buffer fills up. BTS does interrupt on the PMU vector, thus NMI. You need to take this i

Re: [perfmon2] [RFC PATCH 1/2] perf_events: add support for per-cpu per-cgroup monitoring (v3)

2010-09-10 Thread Tejun Heo
Hello, On 09/10/2010 10:16 AM, Peter Zijlstra wrote: > On Thu, 2010-09-09 at 23:41 +0200, Stephane Eranian wrote: >>> alloc_percpu() is zalloc_percpu() in fact, memory is already cleared. >>> >> I remember thinking about this and trying to trace to the code down >> to figure this out. But it is ra

Re: [perfmon2] [PATCH] percpu: update comments to reflect that percpu allocations are always zero-filled

2010-09-10 Thread Eric Dumazet
Le vendredi 10 septembre 2010 à 11:03 +0200, Tejun Heo a écrit : > Signed-off-by: Tejun Heo > Reported-by: Stephane Eranian > --- Acked-by: Eric Dumazet -- Automate Storage Tiering Simply Optimize IT performance and

Re: [perfmon2] [PATCH] percpu: update comments to reflect that percpu allocations are always zero-filled

2010-09-10 Thread Stephane Eranian
Thanks On Fri, Sep 10, 2010 at 11:03 AM, Tejun Heo wrote: > Signed-off-by: Tejun Heo > Reported-by: Stephane Eranian > --- >  mm/percpu.c |   11 ++- >  1 files changed, 6 insertions(+), 5 deletions(-) > > diff --git a/mm/percpu.c b/mm/percpu.c > index 0cd4bf6..12dea33 100644 > --- a/mm/

[perfmon2] [PATCH] percpu: update comments to reflect that percpu allocations are always zero-filled

2010-09-10 Thread Tejun Heo
Signed-off-by: Tejun Heo Reported-by: Stephane Eranian --- mm/percpu.c | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/mm/percpu.c b/mm/percpu.c index 0cd4bf6..12dea33 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -826,8 +826,8 @@ fail_unlock_mutex: * @size:

[perfmon2] [PATCH percpu#for-next] percpu: clear memory allocated with the km allocator

2010-09-10 Thread Tejun Heo
Percpu allocator should clear memory before returning it but the km allocator forgot to do it. Fix it. Signed-off-by: Tejun Heo Spotted-by: Peter Zijlstra --- mm/percpu-km.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/mm/percpu-km.c b/mm/percpu-km.c index 7037

Re: [perfmon2] [RFC PATCH 1/2] perf_events: add support for per-cpu per-cgroup monitoring (v3)

2010-09-10 Thread Stephane Eranian
On Fri, Sep 10, 2010 at 10:41 AM, Tejun Heo wrote: > > Hello, > > On 09/10/2010 10:16 AM, Peter Zijlstra wrote: > > On Thu, 2010-09-09 at 23:41 +0200, Stephane Eranian wrote: > >>> alloc_percpu() is zalloc_percpu() in fact, memory is already cleared. > >>> > >> I remember thinking about this and t

Re: [perfmon2] [RFC PATCH 1/2] perf_events: add support for per-cpu per-cgroup monitoring (v3)

2010-09-10 Thread Stephane Eranian
On Fri, Sep 10, 2010 at 10:41 AM, Tejun Heo wrote: > Hello, > > On 09/10/2010 10:16 AM, Peter Zijlstra wrote: > > On Thu, 2010-09-09 at 23:41 +0200, Stephane Eranian wrote: > >>> alloc_percpu() is zalloc_percpu() in fact, memory is already cleared. > >>> > >> I remember thinking about this and tr

Re: [perfmon2] [PATCH percpu#for-next] percpu: clear memory allocated with the km allocator

2010-09-10 Thread Peter Zijlstra
On Fri, 2010-09-10 at 10:52 +0200, Tejun Heo wrote: > Percpu allocator should clear memory before returning it but the km > allocator forgot to do it. Fix it. > > Signed-off-by: Tejun Heo > Spotted-by: Peter Zijlstra (fwiw, -tip uses Reported-by) Acked-by: Peter Zijlstra > --- > mm/percpu-

Re: [perfmon2] [RFC PATCH 1/2] perf_events: add support for per-cpu per-cgroup monitoring (v3)

2010-09-10 Thread Peter Zijlstra
On Thu, 2010-09-09 at 23:41 +0200, Stephane Eranian wrote: > > alloc_percpu() is zalloc_percpu() in fact, memory is already cleared. > > > I remember thinking about this and trying to trace to the code down > to figure this out. But it is rather complicated. If alloc_percpu() always > clears the me