All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -rt] sched: teach migrate_disable about atomic contexts
Date: Tue, 6 Sep 2011 15:08:19 -0300	[thread overview]
Message-ID: <20110906180819.GA5365@ghostprotocols.net> (raw)
In-Reply-To: <1314967297.1301.14.camel@twins>

Em Fri, Sep 02, 2011 at 02:41:37PM +0200, Peter Zijlstra escreveu:
> Subject: sched: teach migrate_disable about atomic contexts
> From: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Date: Fri Sep 02 14:29:27 CEST 2011
> 
>  <NMI>  [<ffffffff812dafd8>] spin_bug+0x94/0xa8
>  [<ffffffff812db07f>] do_raw_spin_lock+0x43/0xea
>  [<ffffffff814fa9be>] _raw_spin_lock_irqsave+0x6b/0x85
>  [<ffffffff8106ff9e>] ? migrate_disable+0x75/0x12d
>  [<ffffffff81078aaf>] ? pin_current_cpu+0x36/0xb0
>  [<ffffffff8106ff9e>] migrate_disable+0x75/0x12d
>  [<ffffffff81115b9d>] pagefault_disable+0xe/0x1f
>  [<ffffffff81047027>] copy_from_user_nmi+0x74/0xe6
>  [<ffffffff810489d7>] perf_callchain_user+0xf3/0x135
> 
> Now clearly we can't go around taking locks from NMI context, cure
> this by short-circuiting migrate_disable() when we're in an atomic
> context already.
> 
> Add some extra debugging to avoid things like:
> 
>   preempt_disable()
>   migrate_disable();
> 
>   preempt_enable();
>   migrate_enable();
> 
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Link: http://lkml.kernel.org/n/tip-wbot4vsmwhi8vmbf83hsclk6@git.kernel.org

Now I can collect callchains with perf on linux RT, thanks.

Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>

- Arnaldo

      reply	other threads:[~2011-09-06 18:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-02 12:41 [PATCH -rt] sched: teach migrate_disable about atomic contexts Peter Zijlstra
2011-09-06 18:08 ` Arnaldo Carvalho de Melo [this message]

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=20110906180819.GA5365@ghostprotocols.net \
    --to=acme@ghostprotocols.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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.