public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vikas Shivappa <vikas.shivappa@linux.intel.com>
To: tony.luck@intel.com, ravi.v.shankar@intel.com,
	fenghua.yu@intel.com, vikas.shivappa@intel.com,
	vikas.shivappa@linux.intel.com
Cc: x86@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com,
	tglx@linutronix.de, mingo@kernel.org, peterz@infradead.org,
	h.peter.anvin@intel.com
Subject: [PATCH 4/4] perf/x86/cqm: Support cqm/mbm only for perf events
Date: Fri, 22 Apr 2016 17:27:21 -0700	[thread overview]
Message-ID: <1461371241-4258-5-git-send-email-vikas.shivappa@linux.intel.com> (raw)
In-Reply-To: <1461371241-4258-1-git-send-email-vikas.shivappa@linux.intel.com>

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

  parent reply	other threads:[~2016-04-23  0:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-23  0:27 [PATCH V1 0/4] Urgent fixes for Intel CQM/MBM counting Vikas Shivappa
2016-04-23  0:27 ` [PATCH 1/4] perf/x86/cqm,mbm: Store cqm,mbm count for all events when RMID is recycled Vikas Shivappa
2016-04-25  9:20   ` Peter Zijlstra
2016-04-25 16:26     ` Vikas Shivappa
2016-04-23  0:27 ` [PATCH 2/4] perf/x86/mbm: Store bytes counted for mbm during recycle Vikas Shivappa
2016-04-25  9:13   ` Peter Zijlstra
2016-04-25 18:04     ` Vikas Shivappa
2016-04-25 20:02       ` Peter Zijlstra
2016-04-25 21:12         ` Vikas Shivappa
2016-05-03  7:46           ` Peter Zijlstra
2016-05-04  0:00             ` Vikas Shivappa
2016-04-23  0:27 ` [PATCH 3/4] perf/x86/mbm: Fix mbm counting when RMIDs are reused Vikas Shivappa
2016-04-25  9:16   ` Peter Zijlstra
2016-04-25 16:44     ` Vikas Shivappa
2016-04-25 20:05       ` Peter Zijlstra
2016-04-25 21:43         ` Vikas Shivappa
2016-04-25 21:49           ` Vikas Shivappa
2016-04-23  0:27 ` Vikas Shivappa [this message]
2016-04-25  9:18   ` [PATCH 4/4] perf/x86/cqm: Support cqm/mbm only for perf events Peter Zijlstra
2016-04-25 16:23     ` Luck, Tony
2016-04-25 20:08       ` Peter Zijlstra

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=1461371241-4258-5-git-send-email-vikas.shivappa@linux.intel.com \
    --to=vikas.shivappa@linux.intel.com \
    --cc=fenghua.yu@intel.com \
    --cc=h.peter.anvin@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=ravi.v.shankar@intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=vikas.shivappa@intel.com \
    --cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox