[RFC PATCH 16/17] perf/x86/intel/pt: Add PMU info

2017-09-05 Thread Alexander Shishkin
Add PMU-specific data structure with family/model/stepping and clock information required by the decoder. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- arch/x86/events/intel/pt.c | 23 ++- arch/x86/events/intel/pt.h | 11 +++ 2

[RFC PATCH 15/17] perf: Allow controlled non-root access to detached events

2017-09-05 Thread Alexander Shishkin
The user who created the event should also be able to open its corresponding file in tracefs and/or remove it. Signed-off-by: Alexander Shishkin --- kernel/events/core.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/kernel/events/core.c b/kernel

[RFC PATCH 16/17] perf/x86/intel/pt: Add PMU info

2017-09-05 Thread Alexander Shishkin
Add PMU-specific data structure with family/model/stepping and clock information required by the decoder. Signed-off-by: Alexander Shishkin --- arch/x86/events/intel/pt.c | 23 ++- arch/x86/events/intel/pt.h | 11 +++ 2 files changed, 33 insertions(+), 1 deletion

[RFC PATCH 14/17] perf: Add ioctl(REATTACH) for detached events

2017-09-05 Thread Alexander Shishkin
This adds an ioctl command to demote a detached event to a 'normal' one that gets destroyed when its file descriptor is closed. It can still be used to mmap the buffers, but not very useful otherwise. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- include/uapi

[RFC PATCH 14/17] perf: Add ioctl(REATTACH) for detached events

2017-09-05 Thread Alexander Shishkin
This adds an ioctl command to demote a detached event to a 'normal' one that gets destroyed when its file descriptor is closed. It can still be used to mmap the buffers, but not very useful otherwise. Signed-off-by: Alexander Shishkin --- include/uapi/linux/perf_event.h | 1 + kernel/events

[RFC PATCH 13/17] perf: Re-inject shmem buffers after exec

2017-09-05 Thread Alexander Shishkin
A exec will unmap everything, but we want our shmem buffers to persist. This tells the page-pinning task work to mmap event's ring buffer after the task exec'ed. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- kernel/events/core.c | 24

[RFC PATCH 13/17] perf: Re-inject shmem buffers after exec

2017-09-05 Thread Alexander Shishkin
A exec will unmap everything, but we want our shmem buffers to persist. This tells the page-pinning task work to mmap event's ring buffer after the task exec'ed. Signed-off-by: Alexander Shishkin --- kernel/events/core.c | 24 1 file changed, 24 insertions(+) diff

[RFC PATCH 12/17] perf: Track pinned events per user

2017-09-05 Thread Alexander Shishkin
Maintain a per-user cpu-indexed array of shmemfs-backed events, same way as mlock accounting. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- include/linux/sched/user.h | 6 kernel/events/core.c| 14 - kernel/events/ring_buffer.

[RFC PATCH 12/17] perf: Track pinned events per user

2017-09-05 Thread Alexander Shishkin
Maintain a per-user cpu-indexed array of shmemfs-backed events, same way as mlock accounting. Signed-off-by: Alexander Shishkin --- include/linux/sched/user.h | 6 kernel/events/core.c| 14 - kernel/events/ring_buffer.c | 69

[RFC PATCH 11/17] perf: Implement mlock accounting for shmem ring buffers

2017-09-05 Thread Alexander Shishkin
o 0, we undo the accounting. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- kernel/events/core.c| 12 +++-- kernel/events/internal.h| 5 +- kernel/events/ring_buffer.c | 124 +--- 3 files changed, 116 insertio

[RFC PATCH 11/17] perf: Implement mlock accounting for shmem ring buffers

2017-09-05 Thread Alexander Shishkin
o 0, we undo the accounting. Signed-off-by: Alexander Shishkin --- kernel/events/core.c| 12 +++-- kernel/events/internal.h| 5 +- kernel/events/ring_buffer.c | 124 +--- 3 files changed, 116 insertions(+), 25 deletions(-) diff --git a/ker

[RFC PATCH 08/17] perf: Allow inheritance for detached events

2017-09-05 Thread Alexander Shishkin
fail, which in turn will fail the parent's fork, something to be aware of. This also effectively disables context cloning, because unlike the traditional events, these will each have its own ring buffer and context switch optimization can't work. Signed-off-by: Alexander Shishkin <alexander.sh

[RFC PATCH 08/17] perf: Allow inheritance for detached events

2017-09-05 Thread Alexander Shishkin
fail, which in turn will fail the parent's fork, something to be aware of. This also effectively disables context cloning, because unlike the traditional events, these will each have its own ring buffer and context switch optimization can't work. Signed-off-by: Alexander Shishkin --- include/linux

[RFC PATCH 10/17] perf: Implement pinning and scheduling for SHMEM events

2017-09-05 Thread Alexander Shishkin
unpinned and its pin count is dropped and a new event is pinned on this cpu. When the pin count goes to zero, we unpin the pages, when it goes to one, we pin them. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- include/linux/perf_event.h | 10 +++ kernel/events/

[RFC PATCH 07/17] perf: Add pmu_info to user page

2017-09-05 Thread Alexander Shishkin
, for versioning. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- include/linux/perf_event.h | 17 ++ include/uapi/linux/perf_event.h | 10 ++ kernel/events/core.c| 27 +-- kernel/events/internal.h| 2 +- kernel/events/ring_bu

[RFC PATCH 10/17] perf: Implement pinning and scheduling for SHMEM events

2017-09-05 Thread Alexander Shishkin
unpinned and its pin count is dropped and a new event is pinned on this cpu. When the pin count goes to zero, we unpin the pages, when it goes to one, we pin them. Signed-off-by: Alexander Shishkin --- include/linux/perf_event.h | 10 +++ kernel/events/core.c| 134

[RFC PATCH 07/17] perf: Add pmu_info to user page

2017-09-05 Thread Alexander Shishkin
, for versioning. Signed-off-by: Alexander Shishkin --- include/linux/perf_event.h | 17 ++ include/uapi/linux/perf_event.h | 10 ++ kernel/events/core.c| 27 +-- kernel/events/internal.h| 2 +- kernel/events/ring_buffer.c | 75

[RFC PATCH 09/17] perf: Use shmemfs pages for userspace-only per-thread detached events

2017-09-05 Thread Alexander Shishkin
constraints are met. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- include/linux/perf_event.h | 1 + kernel/events/core.c| 2 +- kernel/events/internal.h| 8 +- kernel/events/ring_buffer.c | 177 +--- 4

[RFC PATCH 09/17] perf: Use shmemfs pages for userspace-only per-thread detached events

2017-09-05 Thread Alexander Shishkin
constraints are met. Signed-off-by: Alexander Shishkin --- include/linux/perf_event.h | 1 + kernel/events/core.c| 2 +- kernel/events/internal.h| 8 +- kernel/events/ring_buffer.c | 177 +--- 4 files changed, 160 insertions(+), 28

[RFC PATCH 06/17] perf: Add buffers to the detached events

2017-09-05 Thread Alexander Shishkin
-only. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- include/uapi/linux/perf_event.h | 3 +++ kernel/events/core.c| 19 kernel/events/internal.h| 2 ++ kernel/events/ring_buffer.c

[RFC PATCH 06/17] perf: Add buffers to the detached events

2017-09-05 Thread Alexander Shishkin
-only. Signed-off-by: Alexander Shishkin --- include/uapi/linux/perf_event.h | 3 +++ kernel/events/core.c| 19 kernel/events/internal.h| 2 ++ kernel/events/ring_buffer.c | 50 + 4 files changed, 74 insertions

[RFC PATCH 05/17] perf: Introduce detached events

2017-09-05 Thread Alexander Shishkin
-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- include/linux/perf_event.h | 4 ++ include/uapi/linux/perf_event.h | 1 + kernel/events/core.c| 138 ++-- kernel/events/internal.h| 6 ++ 4 files change

[RFC PATCH 05/17] perf: Introduce detached events

2017-09-05 Thread Alexander Shishkin
-off-by: Alexander Shishkin --- include/linux/perf_event.h | 4 ++ include/uapi/linux/perf_event.h | 1 + kernel/events/core.c| 138 ++-- kernel/events/internal.h| 6 ++ 4 files changed, 142 insertions(+), 7 deletions(-) diff --git

[RFC PATCH 03/17] tracefs: De-globalize instances' callbacks

2017-09-05 Thread Alexander Shishkin
tracefs_dir_ops so that it's possible to have multiple such subdirectories. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> Cc: Steven Rostedt <rost...@goodmis.org> --- fs/tracefs/inode.c | 35 +-- 1 file changed, 25 insertions(+),

[RFC PATCH 04/17] tracefs: Add ->unlink callback to tracefs_dir_ops

2017-09-05 Thread Alexander Shishkin
In addition to mkdir and rmdir, also allow unlink operation within the 'instances' directory if such callback is defined. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> Cc: Steven Rostedt <rost...@goodmis.org> --- fs/tracefs/inode

[RFC PATCH 03/17] tracefs: De-globalize instances' callbacks

2017-09-05 Thread Alexander Shishkin
tracefs_dir_ops so that it's possible to have multiple such subdirectories. Signed-off-by: Alexander Shishkin Cc: Steven Rostedt --- fs/tracefs/inode.c | 35 +-- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c

[RFC PATCH 04/17] tracefs: Add ->unlink callback to tracefs_dir_ops

2017-09-05 Thread Alexander Shishkin
In addition to mkdir and rmdir, also allow unlink operation within the 'instances' directory if such callback is defined. Signed-off-by: Alexander Shishkin Cc: Steven Rostedt --- fs/tracefs/inode.c | 36 +++- include/linux/tracefs.h | 3 ++- kernel/trace

[RFC PATCH 02/17] perf: Factor out mlock accounting

2017-09-05 Thread Alexander Shishkin
This patch moves ring buffer memory accounting down the rb_alloc() path so that its callers won't have to worry about it. This also serves the additional purpose of slightly cleaning up perf_mmap(). Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- kernel/events/

[RFC PATCH 02/17] perf: Factor out mlock accounting

2017-09-05 Thread Alexander Shishkin
This patch moves ring buffer memory accounting down the rb_alloc() path so that its callers won't have to worry about it. This also serves the additional purpose of slightly cleaning up perf_mmap(). Signed-off-by: Alexander Shishkin --- kernel/events/core.c| 67

[RFC PATCH 00/17] perf: Detached events

2017-09-05 Thread Alexander Shishkin
ched-shmem-wip Alexander Shishkin (17): perf: Allow mmapping only user page perf: Factor out mlock accounting tracefs: De-globalize instances' callbacks tracefs: Add ->unlink callback to tracefs_dir_ops perf: Introduce detached events perf: Add buffers to the detached events perf:

[RFC PATCH 00/17] perf: Detached events

2017-09-05 Thread Alexander Shishkin
ched-shmem-wip Alexander Shishkin (17): perf: Allow mmapping only user page perf: Factor out mlock accounting tracefs: De-globalize instances' callbacks tracefs: Add ->unlink callback to tracefs_dir_ops perf: Introduce detached events perf: Add buffers to the detached events perf:

[RFC PATCH 01/17] perf: Allow mmapping only user page

2017-09-05 Thread Alexander Shishkin
-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index cb7eaf0f91..9389e27cb0 100644 --- a/kernel/events/core.c +++ b/kernel/events/

[RFC PATCH 01/17] perf: Allow mmapping only user page

2017-09-05 Thread Alexander Shishkin
-off-by: Alexander Shishkin --- kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index cb7eaf0f91..9389e27cb0 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -5366,7 +5366,7 @@ static int perf_mmap

Re: [PATCH v6 1/3] perf/core: use rb trees for pinned/flexible groups

2017-08-30 Thread Alexander Shishkin
Alexey Budankov <alexey.budan...@linux.intel.com> writes: > On 30.08.2017 13:18, Alexander Shishkin wrote: >> Alexey Budankov <alexey.budan...@linux.intel.com> writes: >> >>>>> Iterating cpu specific subtree like this: >>>>> >>

Re: [PATCH v6 1/3] perf/core: use rb trees for pinned/flexible groups

2017-08-30 Thread Alexander Shishkin
Alexey Budankov writes: > On 30.08.2017 13:18, Alexander Shishkin wrote: >> Alexey Budankov writes: >> >>>>> Iterating cpu specific subtree like this: >>>>> >>>>> #define for_each_group_event(event, group, cpu, pmu, field)\ &g

Re: [PATCH v6 1/3] perf/core: use rb trees for pinned/flexible groups

2017-08-30 Thread Alexander Shishkin
Alexey Budankov writes: >>> Iterating cpu specific subtree like this: >>> >>> #define for_each_group_event(event, group, cpu, pmu, field) \ >>> for (event = rb_entry_safe(group_first(group, cpu, pmu), \ >>>typeof(*event),

Re: [PATCH v6 1/3] perf/core: use rb trees for pinned/flexible groups

2017-08-30 Thread Alexander Shishkin
Alexey Budankov writes: >>> Iterating cpu specific subtree like this: >>> >>> #define for_each_group_event(event, group, cpu, pmu, field) \ >>> for (event = rb_entry_safe(group_first(group, cpu, pmu), \ >>>typeof(*event), field); \ >>> event &&

[tip:perf/core] perf/core, pt, bts: Get rid of itrace_started

2017-08-29 Thread tip-bot for Alexander Shishkin
Commit-ID: 8d4e6c4caa12dafbcba138e5450b7af17b0b2194 Gitweb: http://git.kernel.org/tip/8d4e6c4caa12dafbcba138e5450b7af17b0b2194 Author: Alexander Shishkin <alexander.shish...@linux.intel.com> AuthorDate: Thu, 30 Mar 2017 18:39:56 +0300 Committer: Ingo Molnar <mi...@kernel.org>

[tip:perf/core] perf/core, pt, bts: Get rid of itrace_started

2017-08-29 Thread tip-bot for Alexander Shishkin
Commit-ID: 8d4e6c4caa12dafbcba138e5450b7af17b0b2194 Gitweb: http://git.kernel.org/tip/8d4e6c4caa12dafbcba138e5450b7af17b0b2194 Author: Alexander Shishkin AuthorDate: Thu, 30 Mar 2017 18:39:56 +0300 Committer: Ingo Molnar CommitDate: Tue, 29 Aug 2017 15:09:24 +0200 perf/core, pt, bts

Re: [PATCH] perf: Explain perf_sched_mutex

2017-08-29 Thread Alexander Shishkin
Alexander Shishkin <alexander.shish...@linux.intel.com> writes: > To clarify why atomic_inc_return(_sched_events) is not sufficient and > a mutex is needed to order static branch enabling vs the atomic counter > increment, this adds a comment with an short explanation. "with

Re: [PATCH] perf: Explain perf_sched_mutex

2017-08-29 Thread Alexander Shishkin
Alexander Shishkin writes: > To clarify why atomic_inc_return(_sched_events) is not sufficient and > a mutex is needed to order static branch enabling vs the atomic counter > increment, this adds a comment with an short explanation. "with a short explanation", sigh > >

[PATCH] perf: Explain perf_sched_mutex

2017-08-29 Thread Alexander Shishkin
To clarify why atomic_inc_return(_sched_events) is not sufficient and a mutex is needed to order static branch enabling vs the atomic counter increment, this adds a comment with an short explanation. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- kernel/events/

[PATCH] perf: Explain perf_sched_mutex

2017-08-29 Thread Alexander Shishkin
To clarify why atomic_inc_return(_sched_events) is not sufficient and a mutex is needed to order static branch enabling vs the atomic counter increment, this adds a comment with an short explanation. Signed-off-by: Alexander Shishkin --- kernel/events/core.c | 5 + 1 file changed, 5

Re: [PATCH v6 1/3] perf/core: use rb trees for pinned/flexible groups

2017-08-29 Thread Alexander Shishkin
Alexey Budankov writes: > Now I figured that not all indexed events are always located under > the root with the same cpu, and it depends on the order of insertion > e.g. with insertion order 01,02,03,14,15,16 we get this: > > 02 > / \ >01 14 >

Re: [PATCH v6 1/3] perf/core: use rb trees for pinned/flexible groups

2017-08-29 Thread Alexander Shishkin
Alexey Budankov writes: > Now I figured that not all indexed events are always located under > the root with the same cpu, and it depends on the order of insertion > e.g. with insertion order 01,02,03,14,15,16 we get this: > > 02 > / \ >01 14 > / \ > 03 15 >

Re: [PATCH] x86/debug: Handle warnings before the notifier chain

2017-08-29 Thread Alexander Shishkin
Peter Zijlstra <pet...@infradead.org> writes: > On Mon, Jul 24, 2017 at 01:04:28PM +0300, Alexander Shishkin wrote: >> Commit >> >> 9a93848fe787 ("x86/debug: Implement __WARN() using UD0") >> >> turned warnings into UD0, but the fix

Re: [PATCH] x86/debug: Handle warnings before the notifier chain

2017-08-29 Thread Alexander Shishkin
Peter Zijlstra writes: > On Mon, Jul 24, 2017 at 01:04:28PM +0300, Alexander Shishkin wrote: >> Commit >> >> 9a93848fe787 ("x86/debug: Implement __WARN() using UD0") >> >> turned warnings into UD0, but the fixup code only runs after the >> not

[GIT PULL 12/15] intel_th: pci: Add Cannon Lake PCH-LP support

2017-08-25 Thread Alexander Shishkin
This adds Intel(R) Trace Hub PCI ID for Cannon Lake PCH-LP. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> Cc: <sta...@vger.kernel.org> --- drivers/hwtracing/intel_th/pci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/hwtracing/intel_th/pci

[GIT PULL 08/15] intel_th: msu: Use the real device in case of IOMMU domain allocation

2017-08-25 Thread Alexander Shishkin
When allocating DMA buffers for the MSU, use the real device instead of GTH. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/intel_th/msu.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/hwtracing/in

[GIT PULL 08/15] intel_th: msu: Use the real device in case of IOMMU domain allocation

2017-08-25 Thread Alexander Shishkin
When allocating DMA buffers for the MSU, use the real device instead of GTH. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/intel_th/msu.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th

[GIT PULL 12/15] intel_th: pci: Add Cannon Lake PCH-LP support

2017-08-25 Thread Alexander Shishkin
This adds Intel(R) Trace Hub PCI ID for Cannon Lake PCH-LP. Signed-off-by: Alexander Shishkin Cc: --- drivers/hwtracing/intel_th/pci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing/intel_th/pci.c index 507db47665..5a9a9e8072

[GIT PULL 10/15] intel_th: pti: Support Low Power Path output port type

2017-08-25 Thread Alexander Shishkin
The Low Power Path (LPP) output port type, looks mostly like PTI to the software, with a few additional bits in the control register. This extends the PTI driver to support LPP ports as well. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/in

[GIT PULL 10/15] intel_th: pti: Support Low Power Path output port type

2017-08-25 Thread Alexander Shishkin
The Low Power Path (LPP) output port type, looks mostly like PTI to the software, with a few additional bits in the control register. This extends the PTI driver to support LPP ports as well. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/intel_th/pti.c | 115

[GIT PULL 13/15] intel_th: pci: Use drvdata for quirks

2017-08-25 Thread Alexander Shishkin
Allow attaching miscellaneous quirk information to devices as drvdata. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/intel_th/core.c | 6 -- drivers/hwtracing/intel_th/intel_th.h | 27 --- drivers/hwtracing/in

[GIT PULL 13/15] intel_th: pci: Use drvdata for quirks

2017-08-25 Thread Alexander Shishkin
Allow attaching miscellaneous quirk information to devices as drvdata. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/intel_th/core.c | 6 -- drivers/hwtracing/intel_th/intel_th.h | 27 --- drivers/hwtracing/intel_th/pci.c | 3 ++- 3 files changed

[GIT PULL 06/15] intel_th: Make SOURCE devices children of the root device

2017-08-25 Thread Alexander Shishkin
under the switch device, but they can still be found under intel_th bus. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/intel_th/core.c | 6 +++--- drivers/hwtracing/intel_th/intel_th.h | 39 +-- 2 files chang

[GIT PULL 06/15] intel_th: Make SOURCE devices children of the root device

2017-08-25 Thread Alexander Shishkin
under the switch device, but they can still be found under intel_th bus. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/intel_th/core.c | 6 +++--- drivers/hwtracing/intel_th/intel_th.h | 39 +-- 2 files changed, 27 insertions(+), 18 deletions(-) diff

[GIT PULL 15/15] intel_th: Perform time resync on capture start

2017-08-25 Thread Alexander Shishkin
. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/intel_th/core.c | 3 +- drivers/hwtracing/intel_th/gth.c | 23 ++ drivers/hwtracing/intel_th/gth.h | 5 drivers/hwtracing/intel_th/intel_th.h | 4 +++ drivers/hwt

[GIT PULL 15/15] intel_th: Perform time resync on capture start

2017-08-25 Thread Alexander Shishkin
. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/intel_th/core.c | 3 +- drivers/hwtracing/intel_th/gth.c | 23 ++ drivers/hwtracing/intel_th/gth.h | 5 drivers/hwtracing/intel_th/intel_th.h | 4 +++ drivers/hwtracing/intel_th/pci.c | 56

[GIT PULL 14/15] intel_th: Add global activate/deactivate callbacks for the glue layers

2017-08-25 Thread Alexander Shishkin
A glue layer may want to install its own hooks into trace capture start and stop paths to apply workarounds. This adds optional callbacks. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/intel_th/core.c | 26 ++ d

[GIT PULL 14/15] intel_th: Add global activate/deactivate callbacks for the glue layers

2017-08-25 Thread Alexander Shishkin
A glue layer may want to install its own hooks into trace capture start and stop paths to apply workarounds. This adds optional callbacks. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/intel_th/core.c | 26 ++ drivers/hwtracing/intel_th/intel_th.h | 2

[GIT PULL 11/15] intel_th: pci: Add Cannon Lake PCH-H support

2017-08-25 Thread Alexander Shishkin
This adds Intel(R) Trace Hub PCI ID for Cannon Lake PCH-H. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> Cc: <sta...@vger.kernel.org> --- drivers/hwtracing/intel_th/pci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/hwtracing/intel_th/pci

[GIT PULL 09/15] intel_th: Enumerate Low Power Path output port type

2017-08-25 Thread Alexander Shishkin
Trace Hub 2.x adds Low Power Path (LPP) output port type, which provides a low power mode trace path from sources to PTI or BSSB. This adds an output subdevice for the LPP port. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/intel_th/core.c

[GIT PULL 09/15] intel_th: Enumerate Low Power Path output port type

2017-08-25 Thread Alexander Shishkin
Trace Hub 2.x adds Low Power Path (LPP) output port type, which provides a low power mode trace path from sources to PTI or BSSB. This adds an output subdevice for the LPP port. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/intel_th/core.c | 15 +++ drivers/hwtracing

[GIT PULL 11/15] intel_th: pci: Add Cannon Lake PCH-H support

2017-08-25 Thread Alexander Shishkin
This adds Intel(R) Trace Hub PCI ID for Cannon Lake PCH-H. Signed-off-by: Alexander Shishkin Cc: --- drivers/hwtracing/intel_th/pci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing/intel_th/pci.c index aac7d66d6a..507db47665 100644

[GIT PULL 07/15] intel_th: Make the switch allocate its subdevices

2017-08-25 Thread Alexander Shishkin
Instead of allocating devices for every possible output subdevice, allow the switch to allocate only the ones that it knows about. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/intel_th/core.c | 288 -- d

[GIT PULL 07/15] intel_th: Make the switch allocate its subdevices

2017-08-25 Thread Alexander Shishkin
Instead of allocating devices for every possible output subdevice, allow the switch to allocate only the ones that it knows about. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/intel_th/core.c | 288 -- drivers/hwtracing/intel_th/gth.c | 17

[GIT PULL 03/15] intel_th: pci: Enable bus mastering

2017-08-25 Thread Alexander Shishkin
The driver forgets to enable bus mastering for the PCI device. Fix this. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/intel_th/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing/in

[GIT PULL 03/15] intel_th: pci: Enable bus mastering

2017-08-25 Thread Alexander Shishkin
The driver forgets to enable bus mastering for the PCI device. Fix this. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/intel_th/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing/intel_th/pci.c index 590cf90dd2..aac7d66d6a

[GIT PULL 04/15] intel_th: Output devices without ports don't need assigning

2017-08-25 Thread Alexander Shishkin
Output subdevices that rely on other output subdevices (or otherwise don't directly talk to an output port on the switch) don't need to be assigned an output port either. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/intel_th/intel_th.

[GIT PULL 05/15] intel_th: Streamline the subdevice tree accessors

2017-08-25 Thread Alexander Shishkin
Make to_intel_th*() accessors available from the main header file. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/intel_th/core.c | 15 --- drivers/hwtracing/intel_th/intel_th.h | 25 - 2 files chang

[GIT PULL 04/15] intel_th: Output devices without ports don't need assigning

2017-08-25 Thread Alexander Shishkin
Output subdevices that rely on other output subdevices (or otherwise don't directly talk to an output port on the switch) don't need to be assigned an output port either. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/intel_th/intel_th.h | 23 --- 1 file changed, 12

[GIT PULL 05/15] intel_th: Streamline the subdevice tree accessors

2017-08-25 Thread Alexander Shishkin
Make to_intel_th*() accessors available from the main header file. Signed-off-by: Alexander Shishkin --- drivers/hwtracing/intel_th/core.c | 15 --- drivers/hwtracing/intel_th/intel_th.h | 25 - 2 files changed, 24 insertions(+), 16 deletions(-) diff

[GIT PULL 02/15] stm class: Document the stm_ftrace

2017-08-25 Thread Alexander Shishkin
From: Chunyan Zhang <chunyan.zh...@spreadtrum.com> This patch adds a description to the stm_ftrace device source, an interface for collecting Ftrace's function trace information via STM devices. Signed-off-by: Chunyan Zhang <chunyan.zh...@spreadtrum.com> Signed-off-by: Alexan

[GIT PULL 02/15] stm class: Document the stm_ftrace

2017-08-25 Thread Alexander Shishkin
From: Chunyan Zhang This patch adds a description to the stm_ftrace device source, an interface for collecting Ftrace's function trace information via STM devices. Signed-off-by: Chunyan Zhang Signed-off-by: Alexander Shishkin --- Documentation/trace/stm.txt | 13 - 1 file

[GIT PULL 01/15] stm: Potential read overflow in stm_char_policy_set_ioctl()

2017-08-25 Thread Alexander Shishkin
gned-off-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- drivers/hwtracing/stm/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c index 0e731

[GIT PULL 01/15] stm: Potential read overflow in stm_char_policy_set_ioctl()

2017-08-25 Thread Alexander Shishkin
From: Dan Carpenter The "size" variable comes from the user so we need to verify that it's large enough to hold an stp_policy_id struct. Fixes: 7bd1d4093c2f ("stm class: Introduce an abstraction for System Trace Module devices") Signed-off-by: Dan Carpenter Signed-off-by

[GIT PULL 00/15] stm class/intel_th: Updates for 4.14

2017-08-25 Thread Alexander Shishkin
potential read overflow in ioctl() * Documented stm_ftrace source. Alexander Shishkin (13): intel_th: pci: Enable bus mastering intel_th: Output devices without ports don't need assigning intel_th: Streamline

[GIT PULL 00/15] stm class/intel_th: Updates for 4.14

2017-08-25 Thread Alexander Shishkin
potential read overflow in ioctl() * Documented stm_ftrace source. Alexander Shishkin (13): intel_th: pci: Enable bus mastering intel_th: Output devices without ports don't need assigning intel_th: Streamline

Re: [PATCH v6 1/3] perf/core: use rb trees for pinned/flexible groups

2017-08-23 Thread Alexander Shishkin
Alexey Budankov writes: > bool event_less(left, right) > { > if (left->cpu < right->cpu) > return true; > > if (left->cpu > right_cpu) > return false; > > if (left->vtime < right->vtime) > return true;

Re: [PATCH v6 1/3] perf/core: use rb trees for pinned/flexible groups

2017-08-23 Thread Alexander Shishkin
Alexey Budankov writes: > bool event_less(left, right) > { > if (left->cpu < right->cpu) > return true; > > if (left->cpu > right_cpu) > return false; > > if (left->vtime < right->vtime) > return true; > > return false; > }

Re: [PATCH v7 2/2] perf/core: add mux switch to skip to the current CPU's events list on mux interrupt

2017-08-23 Thread Alexander Shishkin
Alexey Budankov writes: > This patch implements mux switch that triggers skipping to the > current CPU's events list at mulitplexing hrtimer interrupt > handler as well as adoption of the switch in the existing > implementation. > >

Re: [PATCH v7 2/2] perf/core: add mux switch to skip to the current CPU's events list on mux interrupt

2017-08-23 Thread Alexander Shishkin
Alexey Budankov writes: > This patch implements mux switch that triggers skipping to the > current CPU's events list at mulitplexing hrtimer interrupt > handler as well as adoption of the switch in the existing > implementation. > > perf_event_groups_iterate_cpu() API is introduced to

Re: [PATCH v7 1/2] perf/core: use rb trees for pinned/flexible groups

2017-08-23 Thread Alexander Shishkin
Alexey Budankov writes: > @@ -3091,61 +3231,55 @@ static void cpu_ctx_sched_out(struct perf_cpu_context > *cpuctx, > } > > static void > -ctx_pinned_sched_in(struct perf_event_context *ctx, > - struct perf_cpu_context *cpuctx) >

Re: [PATCH v7 1/2] perf/core: use rb trees for pinned/flexible groups

2017-08-23 Thread Alexander Shishkin
Alexey Budankov writes: > @@ -3091,61 +3231,55 @@ static void cpu_ctx_sched_out(struct perf_cpu_context > *cpuctx, > } > > static void > -ctx_pinned_sched_in(struct perf_event_context *ctx, > - struct perf_cpu_context *cpuctx) > +ctx_pinned_sched_in(struct perf_event *event,

Re: [PATCH 1/2] perf/aux: Make aux_{head,wakeup} ring_buffer members long

2017-07-31 Thread Alexander Shishkin
Will Deacon writes: > The aux_head and aux_wakeup members of struct ring_buffer are defined > using the local_t type, despite the fact that they are only accessed via > the perf_aux_output_* functions, which cannot race with each other for a > given ring buffer. > > This

Re: [PATCH 1/2] perf/aux: Make aux_{head,wakeup} ring_buffer members long

2017-07-31 Thread Alexander Shishkin
Will Deacon writes: > The aux_head and aux_wakeup members of struct ring_buffer are defined > using the local_t type, despite the fact that they are only accessed via > the perf_aux_output_* functions, which cannot race with each other for a > given ring buffer. > > This patch changes the type

Re: [PATCH 2/2] perf/aux: Ensure aux_wakeup represents most recent wakeup index

2017-07-31 Thread Alexander Shishkin
> rb->aux_wakeup, therefore taking into account any overruns by the > hardware. Let's add a small comment to the @aux_wakeup field definition? Other than that, Acked-by: Alexander Shishkin <alexander.shish...@linux.intel.com> > > Cc: Alexander Shishkin <alexander.sh

Re: [PATCH 2/2] perf/aux: Ensure aux_wakeup represents most recent wakeup index

2017-07-31 Thread Alexander Shishkin
for a smaller aux_watermark > (e.g. PAGE_SIZE / 4), then the wakeup would in fact be behind head at > this point. > > This patch fixes the problem by rounding down the aux_head (as sampled > from the handle) to the nearest aux_watermark boundary when updating > rb->aux_wakeup, ther

[GIT PULL] intel_th: Fixes for char-misc-linus

2017-07-26 Thread Alexander Shishkin
: Fixes for v4.13 These are two new PCI IDs (Cannon Lake PCH-H and PCH-LP). Alexander Shishkin (2): intel_th: pci: Add Cannon Lake PCH-H support intel_th: pci: Add Cannon Lake PCH-LP support drivers/hwtracing/intel_th

[GIT PULL] intel_th: Fixes for char-misc-linus

2017-07-26 Thread Alexander Shishkin
: Fixes for v4.13 These are two new PCI IDs (Cannon Lake PCH-H and PCH-LP). Alexander Shishkin (2): intel_th: pci: Add Cannon Lake PCH-H support intel_th: pci: Add Cannon Lake PCH-LP support drivers/hwtracing/intel_th

[PATCH] x86/debug: Handle warnings before the notifier chain

2017-07-24 Thread Alexander Shishkin
fier chain in the invalid op handler path. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> Cc: Arjan van de Ven <ar...@linux.intel.com> Cc: Borislav Petkov <b...@alien8.de> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Richard Weinberger <richard.wein

[PATCH] x86/debug: Handle warnings before the notifier chain

2017-07-24 Thread Alexander Shishkin
fier chain in the invalid op handler path. Signed-off-by: Alexander Shishkin Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Peter Zijlstra Cc: Richard Weinberger Cc: Thomas Gleixner Cc: Ingo Molnar Cc: linux-kernel@vger.kernel.org --- arch/x86/kernel/traps.c | 10 +++--- 1 file changed, 7

[tip:perf/urgent] perf/core: Fix scheduling regression of pinned groups

2017-07-20 Thread tip-bot for Alexander Shishkin
Commit-ID: 3bda69c1c3993a2bddbae01397d12bfef6054011 Gitweb: http://git.kernel.org/tip/3bda69c1c3993a2bddbae01397d12bfef6054011 Author: Alexander Shishkin <alexander.shish...@linux.intel.com> AuthorDate: Tue, 18 Jul 2017 14:08:34 +0300 Committer: Ingo Molnar <mi...@kernel.org>

[tip:perf/urgent] perf/core: Fix scheduling regression of pinned groups

2017-07-20 Thread tip-bot for Alexander Shishkin
Commit-ID: 3bda69c1c3993a2bddbae01397d12bfef6054011 Gitweb: http://git.kernel.org/tip/3bda69c1c3993a2bddbae01397d12bfef6054011 Author: Alexander Shishkin AuthorDate: Tue, 18 Jul 2017 14:08:34 +0300 Committer: Ingo Molnar CommitDate: Thu, 20 Jul 2017 09:43:02 +0200 perf/core: Fix

Re: [PATCH v5 1/4]: perf/core: use rb trees for pinned/flexible groups

2017-07-19 Thread Alexander Shishkin
Alexey Budankov writes: >>> +static void >>> +perf_event_groups_insert(struct perf_event_groups *groups, >>> + struct perf_event *event) >>> +{ >>> + struct rb_node **node; >>> + struct rb_node *parent; >>> + struct perf_event *node_event; >>> +

Re: [PATCH v5 1/4]: perf/core: use rb trees for pinned/flexible groups

2017-07-19 Thread Alexander Shishkin
Alexey Budankov writes: >>> +static void >>> +perf_event_groups_insert(struct perf_event_groups *groups, >>> + struct perf_event *event) >>> +{ >>> + struct rb_node **node; >>> + struct rb_node *parent; >>> + struct perf_event *node_event; >>> + >>> + WARN_ON_ONCE(!groups ||

Re: [PATCH v5 4/4]: perf/core: complete replace of lists by rb trees for pinned and flexible groups at perf_event_context

2017-07-18 Thread Alexander Shishkin
Alexey Budankov <alexey.budan...@linux.intel.com> writes: > On 18.07.2017 19:55, Alexander Shishkin wrote: >> Alexey Budankov <alexey.budan...@linux.intel.com> writes: >> >>> I see. Do you personally have some more issues that needs to be addressed? >&g

Re: [PATCH v5 4/4]: perf/core: complete replace of lists by rb trees for pinned and flexible groups at perf_event_context

2017-07-18 Thread Alexander Shishkin
Alexey Budankov writes: > On 18.07.2017 19:55, Alexander Shishkin wrote: >> Alexey Budankov writes: >> >>> I see. Do you personally have some more issues that needs to be addressed? >>> My intention is that this patch v5 4/4 addresses all your comments raised

Re: [PATCH v5 4/4]: perf/core: complete replace of lists by rb trees for pinned and flexible groups at perf_event_context

2017-07-18 Thread Alexander Shishkin
Alexey Budankov writes: > I see. Do you personally have some more issues that needs to be addressed? > My intention is that this patch v5 4/4 addresses all your comments raised in > the previous reviews. I don't know yet, I haven't started on the actual content

<    2   3   4   5   6   7   8   9   10   11   >