All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu
Subject: Re: [PATCH 3/4] tracing: fix recursive test level calculation
Date: Mon, 20 Apr 2009 12:30:34 -0700	[thread overview]
Message-ID: <20090420123034.ffa17e14.akpm@linux-foundation.org> (raw)
In-Reply-To: <20090420174017.997451662@goodmis.org>

On Mon, 20 Apr 2009 13:38:22 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

>  static int trace_irq_level(void)
>  {
> -	return hardirq_count() + softirq_count() + in_nmi();
> +	return (hardirq_count() >> HARDIRQ_SHIFT) +
> +		(softirq_count() >> + SOFTIRQ_SHIFT) +
> +		!!in_nmi();
>  }

hah, tricked you!

IMO hardirq_count() and softirq_count() should do the shift internally.
They're terribly misleading at present.

  reply	other threads:[~2009-04-20 19:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-20 17:38 [PATCH 0/4] [GIT PULL] tracing: recursion and compile fixes Steven Rostedt
2009-04-20 17:38 ` [PATCH 1/4] tracing/events: call the correct event trace selftest init function Steven Rostedt
2009-04-20 17:38 ` [PATCH 2/4] tracing: remove dangling semicolon Steven Rostedt
2009-04-20 17:38 ` [PATCH 3/4] tracing: fix recursive test level calculation Steven Rostedt
2009-04-20 19:30   ` Andrew Morton [this message]
2009-04-20 17:38 ` [PATCH 4/4] tracing: remove recursive test from ring_buffer_event_discard Steven Rostedt
2009-04-20 17:55 ` [PATCH 0/4] [GIT PULL] tracing: recursion and compile fixes Ingo Molnar
2009-04-20 19:28   ` Ingo Molnar
2009-04-20 19:45     ` Frederic Weisbecker
2009-04-20 19:53       ` Steven Rostedt
2009-04-20 20:17       ` Steven Rostedt
2009-04-20 20:33         ` Frederic Weisbecker
2009-04-20 20:44           ` Steven Rostedt
2009-04-20 21:01             ` Frederic Weisbecker
2009-04-20 21:14               ` Steven Rostedt
2009-04-20 21:25                 ` Frederic Weisbecker
2009-04-20 19:29   ` Ingo Molnar
2009-04-20 19:43     ` Steven Rostedt
2009-04-20 19:48       ` Frederic Weisbecker
2009-04-20 19:55       ` Steven Rostedt

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=20090420123034.ffa17e14.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.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.