Skip to content

toplev kernel support

Andi Kleen edited this page Mar 15, 2015 · 22 revisions

Kernel patches/workarounds needed for toplev

toplev uses many events and is quite demanding on the kernel PMU code, so it may need kernel updates or bug work arounds to fix issues in the perf driver. The only way to update the perf driver is to update the kernel. Known issues are documented here.

The SHA hashes below refer to kernel git commits, which can be looked up at https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/

Issues affecting up-to-date systems (as of 3.19):

  • Some L3 memory nodes are not supported on IvyBridge because their events have been disabled in the kernel since 3.9 The current workaround is to revert commit 741a698f420c34c458294a6accecfbad702a7c52 or apply [http://halobates.de/ivb-allow-mem-load-uops]. Eventually this should be fixed with this (complicated) patch kit: [http://lkml.iu.edu/hypermail/linux/kernel/1406.0/02808.html]. So it did not make it into any kernel release.

  • On Haswell the level 3 memory nodes will not schedule correctly and may give not counted. Patch is currently pending: http://lkml.iu.edu/hypermail/linux/kernel/1503.1/01086.html and has not been added to a kernel release yet.

Issues independent of the kernel:

  • toplev requires a reasonably recent perf tool. The perf tools is independent of the kernel and can be updated. You can use the PERF=... environment variable to point to the tool to use. The one in original 2.6.32 based RHEL6 is too old for example. If that's a problem get a recent kernel source and build the perf tool in tools/perf and use that binary.

Issues affecting older systems (before kernel 3.17)

  • On Haswell the False_Sharing and Contested accesses nodes may not be supported. In this case you need commit 36bbb2f2988a29cdc3f8e0c93478795934553454 or 3.17+

  • On IvyBridge Level 2 may not measure memory bound correctly without commit 6113af14c82726d5a2993a7ba238df24c990a5ee to fix the counter constraints. Available in 3.12+

  • On Sandy Bridge Level 3 memory events did not schedule correctly before 3.9. Was fixed with commit f8378f5259647710f0b4ecb814b0a1b0d9040de0

  • On really old kernels (2.6.32) various groups generated by toplev did not schedule correctly and were not counted. The workaround is to use --no-group. In this case it's recommended to avoid any PMU sharing, and some values may be mis-measured.