Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar:
"A bogus warning fix, a counter width handling fix affecting certain
machines, plus a oneliner hw-enablement patch for Knights Mill CPUs"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf/core: Remove invalid warning from list_update_cgroup_even()t
perf/x86: Fix full width counter, counter overflow
perf/x86/intel: Enable C-state residency events for Knights Mill

+11 -13
+1 -1
arch/x86/events/core.c
··· 69 69 int shift = 64 - x86_pmu.cntval_bits; 70 70 u64 prev_raw_count, new_raw_count; 71 71 int idx = hwc->idx; 72 - s64 delta; 72 + u64 delta; 73 73 74 74 if (idx == INTEL_PMC_IDX_FIXED_BTS) 75 75 return 0;
+1 -1
arch/x86/events/intel/core.c
··· 4034 4034 4035 4035 /* Support full width counters using alternative MSR range */ 4036 4036 if (x86_pmu.intel_cap.full_width_write) { 4037 - x86_pmu.max_period = x86_pmu.cntval_mask; 4037 + x86_pmu.max_period = x86_pmu.cntval_mask >> 1; 4038 4038 x86_pmu.perfctr = MSR_IA32_PMC0; 4039 4039 pr_cont("full-width counters, "); 4040 4040 }
+1
arch/x86/events/intel/cstate.c
··· 540 540 X86_CSTATES_MODEL(INTEL_FAM6_SKYLAKE_DESKTOP, snb_cstates), 541 541 542 542 X86_CSTATES_MODEL(INTEL_FAM6_XEON_PHI_KNL, knl_cstates), 543 + X86_CSTATES_MODEL(INTEL_FAM6_XEON_PHI_KNM, knl_cstates), 543 544 { }, 544 545 }; 545 546 MODULE_DEVICE_TABLE(x86cpu, intel_cstates_match);
+8 -11
kernel/events/core.c
··· 903 903 */ 904 904 cpuctx = __get_cpu_context(ctx); 905 905 906 - /* Only set/clear cpuctx->cgrp if current task uses event->cgrp. */ 907 - if (perf_cgroup_from_task(current, ctx) != event->cgrp) { 908 - /* 909 - * We are removing the last cpu event in this context. 910 - * If that event is not active in this cpu, cpuctx->cgrp 911 - * should've been cleared by perf_cgroup_switch. 912 - */ 913 - WARN_ON_ONCE(!add && cpuctx->cgrp); 914 - return; 915 - } 916 - cpuctx->cgrp = add ? event->cgrp : NULL; 906 + /* 907 + * cpuctx->cgrp is NULL until a cgroup event is sched in or 908 + * ctx->nr_cgroup == 0 . 909 + */ 910 + if (add && perf_cgroup_from_task(current, ctx) == event->cgrp) 911 + cpuctx->cgrp = event->cgrp; 912 + else if (!add) 913 + cpuctx->cgrp = NULL; 917 914 } 918 915 919 916 #else /* !CONFIG_CGROUP_PERF */