Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754680Ab2BTWi7 (ORCPT ); Mon, 20 Feb 2012 17:38:59 -0500 Received: from am1ehsobe004.messaging.microsoft.com ([213.199.154.207]:5275 "EHLO AM1EHSOBE003.bigfish.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754287Ab2BTWi5 (ORCPT ); Mon, 20 Feb 2012 17:38:57 -0500 X-SpamScore: 2 X-BigFish: VS2(zzbb2dIc85fhzz1202hzzz2dh87h2a8h668h839h8e2h8e3hbe9k34h) X-Forefront-Antispam-Report: CIP:160.36.179.132;KIP:(null);UIP:(null);IPV:NLI;H:kedge1.utk.tennessee.edu;RD:kedge1.utk.tennessee.edu;EFVD:NLI X-FB-DOMAIN-IP-MATCH: fail Date: Mon, 20 Feb 2012 17:38:49 -0500 From: Vince Weaver To: CC: , , Paul Mackerras , Arnaldo Carvalho de Melo , Stephane Eranian Subject: [PATCH] perf_event use rdpmc rather than rdmsr when possible in kernel Message-ID: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-606314816-1329777531=:2753" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 13607 Lines: 259 --8323329-606314816-1329777531=:2753 Content-Type: text/plain; charset="US-ASCII" Hello The perfctr interface uses rdpmc rather than rdmsr when possible in the kernel, as rdpmc tends to have lower latencies. (One can look in etc/costs in the perfctr-2.6 package to see a historical list of the overhead). I have done some tests on a 3.2 kernel: rdmsr rdpmc Core2 T9900: 203.9 cycles 30.9 cycles AMD fam0fh: 56.2 cycles 9.8 cycles Atom 6/28/2: 129.7 cycles 50.6 cycles As you can see the speedup of using rdpmc is large, although granted it really is a drop in the bucket compared to the other overheads involved. I've attached a kernel module that can be used to test this on your own personal x86 machine. Below is a patch that changes perf_event to use rdpmc rather than rdmsr when possible. It's probably possible (and desirable) to do this without requiring a new field in the hw_perf_event structure, but the fixed events make this tricky. Signed-off-by: Vince Weaver diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 5adce10..5550047 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c @@ -85,7 +85,7 @@ u64 x86_perf_event_update(struct perf_event *event) */ again: prev_raw_count = local64_read(&hwc->prev_count); - rdmsrl(hwc->event_base, new_raw_count); + new_raw_count=native_read_pmc(hwc->event_base_rdpmc); if (local64_cmpxchg(&hwc->prev_count, prev_raw_count, new_raw_count) != prev_raw_count) @@ -768,9 +768,11 @@ static inline void x86_assign_hw_event(struct perf_event *event, } else if (hwc->idx >= X86_PMC_IDX_FIXED) { hwc->config_base = MSR_ARCH_PERFMON_FIXED_CTR_CTRL; hwc->event_base = MSR_ARCH_PERFMON_FIXED_CTR0 + (hwc->idx - X86_PMC_IDX_FIXED); + hwc->event_base_rdpmc = (hwc->idx - X86_PMC_IDX_FIXED) | 1<<30; } else { hwc->config_base = x86_pmu_config_addr(hwc->idx); hwc->event_base = x86_pmu_event_addr(hwc->idx); + hwc->event_base_rdpmc = x86_pmu_addr_offset(hwc->idx); } } diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index abb2776..432ac69 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -562,6 +562,7 @@ struct hw_perf_event { u64 last_tag; unsigned long config_base; unsigned long event_base; + unsigned long event_base_rdpmc; int idx; int last_cpu; struct hw_perf_event_extra extra_reg; --8323329-606314816-1329777531=:2753 Content-Type: text/plain; charset="US-ASCII"; name="Makefile" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Makefile Content-Disposition: attachment; filename="Makefile" b2JqLW0gOj0gcmRwbWMtbW9kdWxlLm8NCktESVIgOj0gL2xpYi9tb2R1bGVz LyQoc2hlbGwgdW5hbWUgLXIpL2J1aWxkDQpQV0QgOj0gJChzaGVsbCBwd2Qp DQoNCmRlZmF1bHQ6DQoJJChNQUtFKSAtQyAkKEtESVIpIFNVQkRJUlM9JChQ V0QpIG1vZHVsZXMNCg0KI2NsZWFuOgkNCiMJcm0gLWYgKi5vICoua28gKn4g Ki5zeW12ZXJzICoub3JkZXI= --8323329-606314816-1329777531=:2753 Content-Type: text/x-csrc; name="rdpmc-module.c" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: rdpmc-module.c Content-Disposition: attachment; filename="rdpmc-module.c" LyogQ29kZSB0YWtlbiBmcm9tIHBlcmZjdHIgYnkgTWlrYWVsIFBldHRlcnNz b24gKi8NCi8qIGh0dHA6Ly91c2VyLml0LnV1LnNlL35taWtwZS9saW51eC9w ZXJmY3RyLyAgICovDQovKiBTbGlnaHRseSBtb2RpZmllZCBieSBWaW5jZSBX ZWF2ZXIgPHZ3ZWF2ZXIxQGVlY3MudXRrLmVkdT4gKi8NCg0KI2luY2x1ZGUg PGxpbnV4L21vZHVsZS5oPg0KI2luY2x1ZGUgPGxpbnV4L2luaXQuaD4NCg0K I2luY2x1ZGUgPGFzbS9tc3IuaD4NCg0KI2RlZmluZSBNU1JfUDVfQ0VTUiAg ICAgICAgICAgICAweDExDQojZGVmaW5lIE1TUl9QNV9DVFIwICAgICAgICAg ICAgIDB4MTINCiNkZWZpbmUgUDVfQ0VTUl9WQUwgICAgICAgICAgICAgKDB4 MTYgfCAoMzw8NikpDQoNCiNkZWZpbmUgUDZfRVZOVFNFTDBfVkFMICAgICAg ICAgKDB4QzAgfCAoMzw8MTYpIHwgKDE8PDIyKSkNCg0KI2RlZmluZSBLN19F Vk5UU0VMMF9WQUwgICAgICAgICAoMHhDMCB8ICgzPDwxNikgfCAoMTw8MjIp KQ0KDQojZGVmaW5lIE1TUl9QNF9JUV9DT1VOVEVSMCAgICAgIDB4MzBDDQoj ZGVmaW5lIFA0X0NSVV9FU0NSMF9WQUwgICAgICAgICgoMjw8MjUpIHwgKDE8 PDkpIHwgKDB4Mzw8MikpDQojZGVmaW5lIFA0X0lRX0NDQ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JlMl9p bml0X3Rlc3RzKCk7ICAgICANCiAgfQ0KICBlbHNlIHsNCiAgICAgcGVyZmN0 cl9nZW5lcmljX2luaXRfdGVzdHMoKTsNCiAgfQ0KICByZXR1cm4gMDsNCn0N Cg0Kc3RhdGljIHZvaWQgX19leGl0IG15bW9kdWxlX2V4aXQodm9pZCkNCnsN CiBwcmludGsgKCJDT1VOVEVSX09WRVJIRUFEOiBVbmxvYWRpbmcuXG4iKTsN CiAgICAgICAgcmV0dXJuOw0KfQ0KDQptb2R1bGVfaW5pdChteW1vZHVsZV9p bml0KTsNCm1vZHVsZV9leGl0KG15bW9kdWxlX2V4aXQpOw0KDQpNT0RVTEVf TElDRU5TRSgiR1BMIik7DQo= --8323329-606314816-1329777531=:2753-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/