Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-16 Thread Parag Warudkar
On Sat, Mar 16, 2013 at 1:56 PM, Linus Torvalds wrote: > On Sat, Mar 16, 2013 at 9:11 AM, Parag Warudkar wrote: >> >> This seems to trigger a WARN_ON during suspend/resume. > > Ugh, yes. It's practically harmless, but it's ugly and technically > wrong (we're using wrmsr_on_cpu() on our current

Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-16 Thread Linus Torvalds
On Sat, Mar 16, 2013 at 9:11 AM, Parag Warudkar wrote: > > This seems to trigger a WARN_ON during suspend/resume. Ugh, yes. It's practically harmless, but it's ugly and technically wrong (we're using wrmsr_on_cpu() on our current cpu, but in a context where using it on anything else would be

Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-16 Thread Parag Warudkar
On Fri, Mar 15, 2013 at 9:26 AM, Stephane Eranian wrote: > > This patch fixes a kernel crash when using precise sampling (PEBS) > after a suspend/resume. Turns out the CPU notifier code is not invoked > on CPU0 (BP). Therefore, the DS_AREA (used by PEBS) is not restored properly > by the kernel

Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-16 Thread Parag Warudkar
On Fri, Mar 15, 2013 at 9:26 AM, Stephane Eranian eran...@google.com wrote: This patch fixes a kernel crash when using precise sampling (PEBS) after a suspend/resume. Turns out the CPU notifier code is not invoked on CPU0 (BP). Therefore, the DS_AREA (used by PEBS) is not restored properly by

Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-16 Thread Linus Torvalds
On Sat, Mar 16, 2013 at 9:11 AM, Parag Warudkar parag.l...@gmail.com wrote: This seems to trigger a WARN_ON during suspend/resume. Ugh, yes. It's practically harmless, but it's ugly and technically wrong (we're using wrmsr_on_cpu() on our current cpu, but in a context where using it on anything

Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-16 Thread Parag Warudkar
On Sat, Mar 16, 2013 at 1:56 PM, Linus Torvalds torva...@linux-foundation.org wrote: On Sat, Mar 16, 2013 at 9:11 AM, Parag Warudkar parag.l...@gmail.com wrote: This seems to trigger a WARN_ON during suspend/resume. Ugh, yes. It's practically harmless, but it's ugly and technically wrong

Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-15 Thread Shuah Khan
On Fri, Mar 15, 2013 at 2:56 PM, Stephane Eranian wrote: > On Fri, Mar 15, 2013 at 9:53 PM, Shuah Khan wrote: >> On Fri, Mar 15, 2013 at 2:31 PM, Greg KH wrote: >>> On Fri, Mar 15, 2013 at 02:26:07PM +0100, Stephane Eranian wrote: This patch fixes a kernel crash when using precise

Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-15 Thread Greg KH
On Fri, Mar 15, 2013 at 09:49:00PM +0100, Stephane Eranian wrote: > On Fri, Mar 15, 2013 at 9:31 PM, Greg KH wrote: > > > > On Fri, Mar 15, 2013 at 02:26:07PM +0100, Stephane Eranian wrote: > > > > > > This patch fixes a kernel crash when using precise sampling (PEBS) > > > after a

Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-15 Thread Stephane Eranian
On Fri, Mar 15, 2013 at 9:53 PM, Shuah Khan wrote: > On Fri, Mar 15, 2013 at 2:31 PM, Greg KH wrote: >> On Fri, Mar 15, 2013 at 02:26:07PM +0100, Stephane Eranian wrote: >>> >>> This patch fixes a kernel crash when using precise sampling (PEBS) >>> after a suspend/resume. Turns out the CPU

Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-15 Thread Shuah Khan
On Fri, Mar 15, 2013 at 2:31 PM, Greg KH wrote: > On Fri, Mar 15, 2013 at 02:26:07PM +0100, Stephane Eranian wrote: >> >> This patch fixes a kernel crash when using precise sampling (PEBS) >> after a suspend/resume. Turns out the CPU notifier code is not invoked >> on CPU0 (BP). Therefore, the

Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-15 Thread Thomas Gleixner
On Fri, 15 Mar 2013, Linus Torvalds wrote: > On Fri, Mar 15, 2013 at 6:26 AM, Stephane Eranian wrote: > > > > This patch fixes a kernel crash when using precise sampling (PEBS) > > after a suspend/resume. > > Yup, works. Applied. > > Can we please get rid of the crazy CPU notifier crap from

Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-15 Thread Stephane Eranian
On Fri, Mar 15, 2013 at 9:31 PM, Greg KH wrote: > > On Fri, Mar 15, 2013 at 02:26:07PM +0100, Stephane Eranian wrote: > > > > This patch fixes a kernel crash when using precise sampling (PEBS) > > after a suspend/resume. Turns out the CPU notifier code is not invoked > > on CPU0 (BP). Therefore,

Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-15 Thread Greg KH
On Fri, Mar 15, 2013 at 02:26:07PM +0100, Stephane Eranian wrote: > > This patch fixes a kernel crash when using precise sampling (PEBS) > after a suspend/resume. Turns out the CPU notifier code is not invoked > on CPU0 (BP). Therefore, the DS_AREA (used by PEBS) is not restored properly > by the

Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-15 Thread Linus Torvalds
On Fri, Mar 15, 2013 at 6:26 AM, Stephane Eranian wrote: > > This patch fixes a kernel crash when using precise sampling (PEBS) > after a suspend/resume. Yup, works. Applied. Can we please get rid of the crazy CPU notifier crap from the perf code, and do this like we do most other wrmsr's etc?

[PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-15 Thread Stephane Eranian
This patch fixes a kernel crash when using precise sampling (PEBS) after a suspend/resume. Turns out the CPU notifier code is not invoked on CPU0 (BP). Therefore, the DS_AREA (used by PEBS) is not restored properly by the kernel and keeps it power-on/resume value of 0 causing any PEBS measurement

[PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-15 Thread Stephane Eranian
This patch fixes a kernel crash when using precise sampling (PEBS) after a suspend/resume. Turns out the CPU notifier code is not invoked on CPU0 (BP). Therefore, the DS_AREA (used by PEBS) is not restored properly by the kernel and keeps it power-on/resume value of 0 causing any PEBS measurement

Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-15 Thread Linus Torvalds
On Fri, Mar 15, 2013 at 6:26 AM, Stephane Eranian eran...@google.com wrote: This patch fixes a kernel crash when using precise sampling (PEBS) after a suspend/resume. Yup, works. Applied. Can we please get rid of the crazy CPU notifier crap from the perf code, and do this like we do most

Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-15 Thread Greg KH
On Fri, Mar 15, 2013 at 02:26:07PM +0100, Stephane Eranian wrote: This patch fixes a kernel crash when using precise sampling (PEBS) after a suspend/resume. Turns out the CPU notifier code is not invoked on CPU0 (BP). Therefore, the DS_AREA (used by PEBS) is not restored properly by the

Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-15 Thread Stephane Eranian
On Fri, Mar 15, 2013 at 9:31 PM, Greg KH gre...@linuxfoundation.org wrote: On Fri, Mar 15, 2013 at 02:26:07PM +0100, Stephane Eranian wrote: This patch fixes a kernel crash when using precise sampling (PEBS) after a suspend/resume. Turns out the CPU notifier code is not invoked on CPU0

Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-15 Thread Thomas Gleixner
On Fri, 15 Mar 2013, Linus Torvalds wrote: On Fri, Mar 15, 2013 at 6:26 AM, Stephane Eranian eran...@google.com wrote: This patch fixes a kernel crash when using precise sampling (PEBS) after a suspend/resume. Yup, works. Applied. Can we please get rid of the crazy CPU notifier crap

Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-15 Thread Shuah Khan
On Fri, Mar 15, 2013 at 2:31 PM, Greg KH gre...@linuxfoundation.org wrote: On Fri, Mar 15, 2013 at 02:26:07PM +0100, Stephane Eranian wrote: This patch fixes a kernel crash when using precise sampling (PEBS) after a suspend/resume. Turns out the CPU notifier code is not invoked on CPU0 (BP).

Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-15 Thread Stephane Eranian
On Fri, Mar 15, 2013 at 9:53 PM, Shuah Khan shuahk...@gmail.com wrote: On Fri, Mar 15, 2013 at 2:31 PM, Greg KH gre...@linuxfoundation.org wrote: On Fri, Mar 15, 2013 at 02:26:07PM +0100, Stephane Eranian wrote: This patch fixes a kernel crash when using precise sampling (PEBS) after a

Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-15 Thread Greg KH
On Fri, Mar 15, 2013 at 09:49:00PM +0100, Stephane Eranian wrote: On Fri, Mar 15, 2013 at 9:31 PM, Greg KH gre...@linuxfoundation.org wrote: On Fri, Mar 15, 2013 at 02:26:07PM +0100, Stephane Eranian wrote: This patch fixes a kernel crash when using precise sampling (PEBS) after a

Re: [PATCH] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume

2013-03-15 Thread Shuah Khan
On Fri, Mar 15, 2013 at 2:56 PM, Stephane Eranian eran...@google.com wrote: On Fri, Mar 15, 2013 at 9:53 PM, Shuah Khan shuahk...@gmail.com wrote: On Fri, Mar 15, 2013 at 2:31 PM, Greg KH gre...@linuxfoundation.org wrote: On Fri, Mar 15, 2013 at 02:26:07PM +0100, Stephane Eranian wrote: This