public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Carsten Emde <Carsten.Emde@osadl.org>
To: Wolfgang Steinwender <wolfgang@psysteme.de>
Cc: linux-rt-users@vger.kernel.org
Subject: Re: Problem with hwlat detector in smp_processor_id()
Date: Thu, 09 Jul 2009 16:36:25 +0200	[thread overview]
Message-ID: <4A560069.6010602@osadl.org> (raw)
In-Reply-To: <4A55D53A.6040108@psysteme.de>

[-- Attachment #1: Type: text/plain, Size: 378 bytes --]

On 07/09/2009 01:32 PM, Wolfgang Steinwender wrote:

> [..] When I'm trying the hardware latency test (hwlatdetect.py) I'm
> getting the following messages:
> hwlat_detector: version 1.0.0
> BUG: using smp_processor_id() in preemptible [00000000] code:
> hwlatdetect/3755
> caller is debug_sample_fread+0x138/0x1ea [hwlat_detector] [..]
Does the attached patch help?

	Carsten.

[-- Attachment #2: hwlat_detector-avoid-smp_processor_id.patch --]
[-- Type: text/x-patch, Size: 849 bytes --]

Index: linux-2.6.29.5-rt22/drivers/misc/hwlat_detector.c
===================================================================
--- linux-2.6.29.5-rt22.orig/drivers/misc/hwlat_detector.c
+++ linux-2.6.29.5-rt22/drivers/misc/hwlat_detector.c
@@ -191,17 +191,11 @@ static struct sample *buffer_get_sample(
 	if (!sample)
 		return NULL;
 
-	/* ring_buffers are per-cpu but we just want any value */
-	/* so we'll start with this cpu and try others if not */
-	/* Steven is planning to add a generic mechanism */
 	mutex_lock(&ring_buffer_mutex);
-	e = ring_buffer_consume(ring_buffer, smp_processor_id(), NULL);
-	if (!e) {
-		for_each_online_cpu(cpu) {
-			e = ring_buffer_consume(ring_buffer, cpu, NULL);
-			if (e)
-				break;
-		}
+	for_each_online_cpu(cpu) {
+		e = ring_buffer_consume(ring_buffer, cpu, NULL);
+		if (e)
+			break;
 	}
 
 	if (e) {

  reply	other threads:[~2009-07-09 14:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-09 11:32 Problem with hwlat detector in smp_processor_id() Wolfgang Steinwender
2009-07-09 14:36 ` Carsten Emde [this message]
2009-08-10 14:07   ` Wolfgang Steinwender
2009-08-10 18:58     ` Clark Williams
2009-07-09 14:36 ` Jon Masters
  -- strict thread matches above, loose matches on Subject: below --
2009-07-22  9:18 John Kacur

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=4A560069.6010602@osadl.org \
    --to=carsten.emde@osadl.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=wolfgang@psysteme.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