From: tip-bot for Alexander Shishkin <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: eranian@google.com, acme@redhat.com, mingo@kernel.org,
tglx@linutronix.de, vincent.weaver@maine.edu, ammy.yi@intel.com,
a.p.zijlstra@chello.nl, hpa@zytor.com,
alexander.shishkin@linux.intel.com,
torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
jolsa@redhat.com
Subject: [tip:perf/urgent] perf/ring_buffer: Fix AUX software double buffering
Date: Fri, 3 May 2019 03:49:18 -0700 [thread overview]
Message-ID: <tip-26ae4f4406f88d82d79c85c11ac5fae18213cd38@git.kernel.org> (raw)
In-Reply-To: <20190503085536.24119-2-alexander.shishkin@linux.intel.com>
Commit-ID: 26ae4f4406f88d82d79c85c11ac5fae18213cd38
Gitweb: https://git.kernel.org/tip/26ae4f4406f88d82d79c85c11ac5fae18213cd38
Author: Alexander Shishkin <alexander.shishkin@linux.intel.com>
AuthorDate: Fri, 3 May 2019 11:55:35 +0300
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 3 May 2019 12:46:10 +0200
perf/ring_buffer: Fix AUX software double buffering
This recent commit:
5768402fd9c6e87 ("perf/ring_buffer: Use high order allocations for AUX buffers optimistically")
overlooked the fact that the previous one page granularity of the AUX buffer
provided an implicit double buffering capability to the PMU driver, which
went away when the entire buffer became one high-order page.
Always make the full-trace mode AUX allocation at least two-part to preserve
the previous behavior and allow the implicit double buffering to continue.
Reported-by: Ammy Yi <ammy.yi@intel.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: adrian.hunter@intel.com
Fixes: 5768402fd9c6e87 ("perf/ring_buffer: Use high order allocations for AUX buffers optimistically")
Link: http://lkml.kernel.org/r/20190503085536.24119-2-alexander.shishkin@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/events/ring_buffer.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c
index 5eedb49a65ea..674b35383491 100644
--- a/kernel/events/ring_buffer.c
+++ b/kernel/events/ring_buffer.c
@@ -610,8 +610,7 @@ int rb_alloc_aux(struct ring_buffer *rb, struct perf_event *event,
* PMU requests more than one contiguous chunks of memory
* for SW double buffering
*/
- if ((event->pmu->capabilities & PERF_PMU_CAP_AUX_SW_DOUBLEBUF) &&
- !overwrite) {
+ if (!overwrite) {
if (!max_order)
return -EINVAL;
next prev parent reply other threads:[~2019-05-03 10:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-03 8:55 [PATCH 0/2] perf: " Alexander Shishkin
2019-05-03 8:55 ` [PATCH 1/2] " Alexander Shishkin
2019-05-03 10:49 ` tip-bot for Alexander Shishkin [this message]
2019-05-03 8:55 ` [PATCH 2/2] perf, pt: Remove software double buffering PMU capability Alexander Shishkin
2019-05-03 10:50 ` [tip:perf/urgent] perf/x86/intel/pt: " tip-bot for Alexander Shishkin
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=tip-26ae4f4406f88d82d79c85c11ac5fae18213cd38@git.kernel.org \
--to=tipbot@zytor.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=ammy.yi@intel.com \
--cc=eranian@google.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=vincent.weaver@maine.edu \
/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
Powered by JetHome