All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org, jolsa@redhat.com,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>
Subject: [PATCH v0 0/2] perf: Allow forcing high-order allocation for AUX buffers
Date: Wed, 13 Feb 2019 13:47:14 +0200	[thread overview]
Message-ID: <20190213114716.63972-1-alexander.shishkin@linux.intel.com> (raw)

Hi Peter and Arnaldo,

It turns out that using high-order allocations for AUX buffers reduces the
run-time performance penalty, for example, with Intel PT. The assumption is
that this comes from not having to fetch the next page's address at every
page boundary. Given a workload that does a lot of indirect branches (thus
generating more PT data with addresses of branch targets), it takes around
6% longer to complete under PT in snapshot mode than without PT, but only
around 4% if we use high-order output regions instead of single page output
regions. This is measured on an Atom CPU.

We already use high-order allocations for PMUs that don't do HW SG (like
Intel PT on BDW). This patchset adds an attribute bit that enables the
same for the PMUs that do have HW SG, and a command line option for perf
record to set this bit.

Alexander Shishkin (2):
  perf: Add an option to ask for high order allocations for AUX buffers
  perf record: Add --aux-highorder

 include/uapi/linux/perf_event.h       | 3 ++-
 kernel/events/core.c                  | 3 +++
 kernel/events/ring_buffer.c           | 3 ++-
 tools/include/uapi/linux/perf_event.h | 3 ++-
 tools/perf/builtin-record.c           | 2 ++
 tools/perf/perf.h                     | 1 +
 tools/perf/util/evsel.c               | 9 +++++++++
 7 files changed, 21 insertions(+), 3 deletions(-)

-- 
2.20.1


             reply	other threads:[~2019-02-13 11:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-13 11:47 Alexander Shishkin [this message]
2019-02-13 11:47 ` [PATCH v0 1/2] perf: Add an option to ask for high order allocations for AUX buffers Alexander Shishkin
2019-02-13 13:07   ` Peter Zijlstra
2019-02-13 13:49     ` Alexander Shishkin
2019-02-13 17:47     ` Mel Gorman
2019-02-13 17:54       ` Peter Zijlstra
2019-02-13 19:17         ` Mel Gorman
2019-02-13 11:47 ` [PATCH v0 2/2] perf record: Add --aux-highorder 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=20190213114716.63972-1-alexander.shishkin@linux.intel.com \
    --to=alexander.shishkin@linux.intel.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    /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.