All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: eranian@gmail.com
Cc: Andi Kleen <andi@firstfloor.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	mingo@elte.hu, x86@kernel.org,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	aris@redhat.com, Cyrill Gorcunov <gorcunov@gmail.com>,
	marco@linux-mips.com
Subject: Re: [patch 05/24] perfmon: X86 generic code (x86)
Date: Thu, 27 Nov 2008 13:16:38 +0100	[thread overview]
Message-ID: <1227788198.4454.1498.camel@twins> (raw)
In-Reply-To: <7c86c4470811270404q2ce1b503lf78c24d5c2223c44@mail.gmail.com>

On Thu, 2008-11-27 at 13:04 +0100, stephane eranian wrote:
> Peter,
> 
> On Thu, Nov 27, 2008 at 12:52 PM, Peter Zijlstra <peterz@infradead.org> wrote:
> > On Thu, 2008-11-27 at 12:35 +0100, stephane eranian wrote:
> >> On Thu, Nov 27, 2008 at 12:31 PM, Andi Kleen <andi@firstfloor.org> wrote:
> >> >> The only reason why I have to deal with NMI is not so much to allow
> >> >> for profiling irq-off regions but because I have to share the PMU with
> >> >> the NMI watchdog. Otherwise I'd have to fail  or disable the NMI watchdog
> >> >> on the fly.
> >> >
> >> > The NMI watchdog is now off by default so failing with it enabled
> >> > is fine.
> >>
> >> Yes, but most likely it is on in distro kernels.
> >
> > So? You can disable it on the fly when there is a perfmon user.
> >
> Yes, you can. There is clearly an interface to do this. I think this is the
> best solution. I know it can work because it experimented with this approach
> no later than last month. But I ran into a bug which I reported on LKML. I did
> not provide a patch because I  did not fully understand the connection to
> suspend/resume.
> 
> The bug has to do with some obscure suspend/resume sequence in:
> 
> void setup_apic_nmi_watchdog(void *unused)
> {
>         if (__get_cpu_var(wd_enabled))
>                 return;
> 
>         /* cheap hack to support suspend/resume */
>         /* if cpu0 is not active neither should the other cpus */
>         if (smp_processor_id() != 0 && atomic_read(&nmi_active) <= 0)
>                 return;
> 
> Basically, when you re-enable the NMI watchdog, it is not always re-enabled
> correctly on all CPUs, it depends on the order if which they process the IPI.

Hmm, either we loose that bit and fix the suspend/resume bit properly,
or we can send the IPIs one by one in the correct order ;-)

Dunno, CC'ed all the folks who touched it last.

  reply	other threads:[~2008-11-27 12:17 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-26  8:42 [patch 05/24] perfmon: X86 generic code (x86) eranian
2008-11-26 11:33 ` Andi Kleen
2008-11-26 12:05   ` Stephen Rothwell
2008-11-26 12:22     ` Andi Kleen
2008-11-26 12:48       ` Stephen Rothwell
2008-11-26 13:32     ` Thomas Gleixner
2008-11-26 13:56       ` stephane eranian
2008-11-26 16:38         ` Thomas Gleixner
2008-11-27  9:51           ` stephane eranian
2008-11-27 10:56             ` Thomas Gleixner
2008-11-27 11:37               ` David Miller
2008-11-27 14:40                 ` Thomas Gleixner
2008-11-26 13:35 ` Thomas Gleixner
2008-11-26 14:00   ` Andi Kleen
2008-11-26 21:18     ` Thomas Gleixner
2008-11-26 21:37       ` stephane eranian
2008-11-26 23:16         ` Thomas Gleixner
2008-11-27  9:38           ` stephane eranian
2008-11-26 22:54     ` Thomas Gleixner
2008-11-27 10:06       ` Andi Kleen
2008-11-27 10:09         ` stephane eranian
2008-11-27 10:29           ` Thomas Gleixner
2008-11-27 11:31           ` Andi Kleen
2008-11-27 11:35             ` stephane eranian
2008-11-27 11:42               ` David Miller
2008-11-27 11:49                 ` Thomas Gleixner
2008-11-27 12:38                   ` Andi Kleen
2008-11-27 12:31                     ` stephane eranian
2008-11-27 12:46                       ` Andi Kleen
2008-11-27 13:32                       ` Thomas Gleixner
2008-11-27 13:37                         ` stephane eranian
2008-11-27 13:51                           ` Andi Kleen
2008-11-27 13:50                         ` Andi Kleen
2008-11-27 11:52               ` Peter Zijlstra
2008-11-27 12:04                 ` stephane eranian
2008-11-27 12:16                   ` Peter Zijlstra [this message]
2008-11-27 12:32               ` Andi Kleen
2008-11-27 12:28                 ` stephane eranian
2008-11-27 12:45                   ` Andi Kleen
2008-11-27 13:30                     ` stephane eranian
2008-11-27 13:49                       ` Andi Kleen
2008-11-27 13:47                         ` stephane eranian
  -- strict thread matches above, loose matches on Subject: below --
2008-11-25 21:36 eranian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1227788198.4454.1498.camel@twins \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=aris@redhat.com \
    --cc=eranian@gmail.com \
    --cc=gorcunov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marco@linux-mips.com \
    --cc=mingo@elte.hu \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.