Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1385543 > unrolled thread

[PATCH 4/4] perf/x86/cqm: Support cqm/mbm only for perf events

Started byVikas Shivappa <vikas.shivappa@linux.intel.com>
First post2016-04-23 02:30 +0200
Last post2016-04-25 22:10 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4/4] perf/x86/cqm: Support cqm/mbm only for perf events Vikas Shivappa <vikas.shivappa@linux.intel.com> - 2016-04-23 02:30 +0200
    Re: [PATCH 4/4] perf/x86/cqm: Support cqm/mbm only for perf events Peter Zijlstra <peterz@infradead.org> - 2016-04-25 11:20 +0200
      RE: [PATCH 4/4] perf/x86/cqm: Support cqm/mbm only for perf events "Luck, Tony" <tony.luck@intel.com> - 2016-04-25 18:30 +0200
        Re: [PATCH 4/4] perf/x86/cqm: Support cqm/mbm only for perf events Peter Zijlstra <peterz@infradead.org> - 2016-04-25 22:10 +0200

#1385543 — [PATCH 4/4] perf/x86/cqm: Support cqm/mbm only for perf events

FromVikas Shivappa <vikas.shivappa@linux.intel.com>
Date2016-04-23 02:30 +0200
Subject[PATCH 4/4] perf/x86/cqm: Support cqm/mbm only for perf events
Message-ID<rqTCp-2k1-5@gated-at.bofh.it>
The cgroup support for cqm is broken. Instead of mapping RMID to a
cgroup currently its mapped to the task and then hence when task moves
cgroup we get incorrect count.

Also the conflict handling code which is meant to handle the case of
co-existing cgroup and task events, is broken. It reports very
confusing numbers of intermittent zero and some occupancy when perf is
run with cgroup and task events.

Hence removing support for the parts which are broken rather than
pretending to support it and giving incorrect data.

Signed-off-by: Vikas Shivappa <vikas.shivappa@linux.intel.com>
---
 arch/x86/events/intel/cqm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/events/intel/cqm.c b/arch/x86/events/intel/cqm.c
index 7328b73..4633fb3 100644
--- a/arch/x86/events/intel/cqm.c
+++ b/arch/x86/events/intel/cqm.c
@@ -1479,7 +1479,8 @@ static int intel_cqm_event_init(struct perf_event *event)
 	    event->attr.exclude_idle   ||
 	    event->attr.exclude_host   ||
 	    event->attr.exclude_guest  ||
-	    event->attr.sample_period) /* no sampling */
+	    event->attr.sample_period  || /* no sampling */
+	    !(event->attach_state & PERF_ATTACH_TASK))
 		return -EINVAL;
 
 	INIT_LIST_HEAD(&event->hw.cqm_group_entry);
-- 
1.9.1

[toc] | [next] | [standalone]


#1386150

FromPeter Zijlstra <peterz@infradead.org>
Date2016-04-25 11:20 +0200
Message-ID<rrKQp-3ck-11@gated-at.bofh.it>
In reply to#1385543
On Fri, Apr 22, 2016 at 05:27:21PM -0700, Vikas Shivappa wrote:
> The cgroup support for cqm is broken. Instead of mapping RMID to a
> cgroup currently its mapped to the task and then hence when task moves
> cgroup we get incorrect count.
> 
> Also the conflict handling code which is meant to handle the case of
> co-existing cgroup and task events, is broken. It reports very
> confusing numbers of intermittent zero and some occupancy when perf is
> run with cgroup and task events.
> 
> Hence removing support for the parts which are broken rather than
> pretending to support it and giving incorrect data.

Uh what, how about attempt to fix it?

[toc] | [prev] | [next] | [standalone]


#1386647

From"Luck, Tony" <tony.luck@intel.com>
Date2016-04-25 18:30 +0200
Message-ID<rrRyA-t4-61@gated-at.bofh.it>
In reply to#1386150
>> Hence removing support for the parts which are broken rather than
>> pretending to support it and giving incorrect data.
>
> Uh what, how about attempt to fix it?

No hope to do that by 4.6 release ... so I suggested to Vikas that it would be better to disable
the feature now so users wouldn't be confused by the random numbers that they'll see if
they try to do this.

-Tony

[toc] | [prev] | [next] | [standalone]


#1386828

FromPeter Zijlstra <peterz@infradead.org>
Date2016-04-25 22:10 +0200
Message-ID<rrUZu-3iQ-71@gated-at.bofh.it>
In reply to#1386647
On Mon, Apr 25, 2016 at 04:23:58PM +0000, Luck, Tony wrote:
> >> Hence removing support for the parts which are broken rather than
> >> pretending to support it and giving incorrect data.
> >
> > Uh what, how about attempt to fix it?
> 
> No hope to do that by 4.6 release ... so I suggested to Vikas that it would be better to disable
> the feature now so users wouldn't be confused by the random numbers that they'll see if
> they try to do this.

Of course, that might have been useful information to have in the
changelog to begin with.

But seeing that its been broken for a number of releases I don't see how
this is urgent to stuff in this one.

I'd instead be more inclined to hurry with Stephanes patches..

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web