public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <monstr@monstr.eu>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: rostedt@goodmis.org, linux-kernel@vger.kernel.org,
	tglx@linutronix.de, mingo@elte.hu, linux-arch@vger.kernel.org
Subject: Re: [PATCH] asm-generic: Use raw_local_irq_save/restore instead local_irq_save/restore
Date: Wed, 28 Jul 2010 07:20:43 +0200	[thread overview]
Message-ID: <4C4FBE2B.6030606@monstr.eu> (raw)
In-Reply-To: <20100727161819.cf6feab1.akpm@linux-foundation.org>

Andrew Morton wrote:
> On Mon, 26 Jul 2010 10:49:50 +0200
> Michal Simek <monstr@monstr.eu> wrote:
> 
>> start/stop_critical_timing function for preemptirqsoff, preemptoff
>> and irqsoff tracers contains atomic_inc and atomic_dec operations.
>>
>> Atomic operations used local_irq_save/restore macros to ensure
>> atomic access but they are traced by the same function which is causing
>> recursion problem.
>>
>> The reason is when these tracers are turn ON then local_irq_save/restore
>> macros are changed in include/linux/irqflags.h to call trace_hardirqs_on/off
>> which call start/stop_critical_timing.
>>
>> Microblaze was affected because use generic atomic implementation.
> 
> Seems that this will also affect blackfin, mn10300 and score.  I guess
> they aren't supporting tracing yet?

If they uses asm-generic/atomic.h, then yes. It seems to me that 
Blackfin uses own asm/atomic.h. nm10300 and score are the same case as 
Microblaze.

In include/linux/irqflags.h is written this commentary.

/*
  * The local_irq_*() APIs are equal to the raw_local_irq*()
  * if !TRACE_IRQFLAGS.
  */

If architecture doesn't enable TRACE_IRQFLAGS then there is no 
difference in behavior. If yes and use asm-generic/atomic.h code, then 
IRQFLAG tracer freeze because it is traced part of irqsoff tracer 
because of recursion as is describe in patch description.

> 
>> Signed-off-by: Michal Simek <monstr@monstr.eu>
>> Acked-by: Steven Rostedt <rostedt@goodmis.org>
>> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> 
> hm, I wonder how my signoff got there.  Doesn't matter.

http://lkml.org/lkml/2010/5/26/364

Michal


-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

  parent reply	other threads:[~2010-07-28  5:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1274863724-14906-1-git-send-email-monstr@monstr.eu>
     [not found] ` <1274863724-14906-2-git-send-email-monstr@monstr.eu>
2010-05-26 14:42   ` [PATCH] asm-generic: Use raw_local_irq_save/restore instead local_irq_save/restore Steven Rostedt
2010-05-26 17:08     ` Andrew Morton
2010-05-26 17:11       ` Steven Rostedt
2010-05-27  7:14         ` Michal Simek
2010-05-27  9:11         ` Yong Zhang
2010-07-26  8:49       ` Michal Simek
2010-07-27 23:18         ` Andrew Morton
2010-07-27 23:54           ` Mike Frysinger
2010-07-28  5:23             ` Michal Simek
2010-07-28  5:20           ` Michal Simek [this message]
2010-07-28  5:35             ` Mike Frysinger

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=4C4FBE2B.6030606@monstr.eu \
    --to=monstr@monstr.eu \
    --cc=akpm@linux-foundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox