From: Stephane Eranian <eranian@google.com>
To: linux-kernel@vger.kernel.org
Cc: peterz@infradead.org, mingo@elte.hu, dave.hansen@linux.intel.com,
ak@linux.intel.com, jolsa@redhat.com
Subject: [PATCH] perf: fix interrupt handler timing harness
Date: Fri, 5 Jul 2013 00:30:11 +0200 [thread overview]
Message-ID: <20130704223010.GA30625@quad> (raw)
This patch fixes a serious bug in:
commit 14c63f17b1fde5a575a28e96547a22b451c71fb5
Author: Dave Hansen <dave.hansen@linux.intel.com>
Date: Fri Jun 21 08:51:36 2013 -0700
perf: Drop sample rate when sampling is too slow
There was an misunderstanding on the API of the do_div()
macro. It returns the remainder of the division and this
was not what the function expected leading to disabling the
interrupt latency watchdog.
This patch also remove a duplicate assignment in
perf_sample_event_took().
Signed-off-by: Stephane Eranian <eranian@google.com>
---
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 1db3af9..1833bc5 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -182,7 +182,7 @@ void update_perf_cpu_limits(void)
u64 tmp = perf_sample_period_ns;
tmp *= sysctl_perf_cpu_time_max_percent;
- tmp = do_div(tmp, 100);
+ do_div(tmp, 100);
atomic_set(&perf_sample_allowed_ns, tmp);
}
@@ -232,7 +232,7 @@ DEFINE_PER_CPU(u64, running_sample_length);
void perf_sample_event_took(u64 sample_len_ns)
{
u64 avg_local_sample_len;
- u64 local_samples_len = __get_cpu_var(running_sample_length);
+ u64 local_samples_len;
if (atomic_read(&perf_sample_allowed_ns) == 0)
return;
next reply other threads:[~2013-07-04 22:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-04 22:30 Stephane Eranian [this message]
2013-07-05 6:54 ` [PATCH] perf: fix interrupt handler timing harness Ingo Molnar
2013-07-05 9:54 ` [tip:perf/urgent] perf: Fix " tip-bot for Stephane Eranian
2013-07-08 14:34 ` [PATCH] perf: fix " Dave Hansen
2013-07-08 18:08 ` Stephane Eranian
2013-07-08 20:05 ` Dave Hansen
2013-07-08 20:20 ` Stephane Eranian
2013-07-08 20:34 ` Dave Hansen
2013-07-08 20:54 ` Andi Kleen
2013-07-08 20:56 ` Stephane 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=20130704223010.GA30625@quad \
--to=eranian@google.com \
--cc=ak@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.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.