Skip to contentSkip to conversation

Revert "perf/x86/intel, watchdog: Switch NMI watchdog to ref cycles on x86"

tip:perf/core Andi Kleen 1 participant 1 message Jul 11, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Andi Kleen

author
#1 lore raw
Quoted 24 lines · tip-bot for Ingo Molnar
Commit-ID:  44530d588e142a96cf0cd345a7cb8911c4f88720
Gitweb:     http://git.kernel.org/tip/44530d588e142a96cf0cd345a7cb8911c4f88720
Author:     Ingo Molnar <[email protected]>
AuthorDate: Sun, 10 Jul 2016 20:58:36 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Sun, 10 Jul 2016 20:58:36 +0200

Revert "perf/x86/intel, watchdog: Switch NMI watchdog to ref cycles on x86"

This reverts commit 2c95afc1e83d93fac3be6923465e1753c2c53b0a.

Stephane reported the following regression:

Quoted 11 lines

Since Andi added:

commit 2c95afc1e83d93fac3be6923465e1753c2c53b0a

Author: Andi Kleen <[email protected]>
Date:   Thu Jun 9 06:14:38 2016 -0700

perf/x86/intel, watchdog: Switch NMI watchdog to ref cycles on x86

$ perf stat -e ref-cycles ls
  <not counted> ....
Quoted 6 lines
Quoted 3 lines

fails systematically because the ref-cycles is now used by the watchdog and given this is a system-wide pinned event, it monopolizes the fixed counter 2 which is the only counter able to measure this event.

Since the next merge window is near, fix the regression for now by reverting the commit.

I don't think there is any better solution than the original patch. The NMI watchdog taking up the precious cycle counter (which is far more important than the obscure ref cycles) was always a big problem because it prevents any groups running that need it.

A lot of tools, including now perf stat --topdown now cannot deal with it without adding extra multiplexing which totally destroys the measurements on non steady state workloads.

So I would prefer to not revert it. If you want ref-cycles you can just disable the NMI watchdog. Today most people who use cycles in non trivial situations have to do that. With ref-cycles still some people have to do it, but it's far less common than before.

So basically the revert is worse than what was there with the patch.

-Andi