lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210528035547.19867-1-yao.jin@linux.intel.com>
Date:   Fri, 28 May 2021 11:55:47 +0800
From:   Jin Yao <yao.jin@...ux.intel.com>
To:     acme@...nel.org, jolsa@...nel.org, peterz@...radead.org,
        mingo@...hat.com, alexander.shishkin@...ux.intel.com
Cc:     Linux-kernel@...r.kernel.org, ak@...ux.intel.com,
        kan.liang@...el.com, yao.jin@...el.com,
        Jin Yao <yao.jin@...ux.intel.com>
Subject: [PATCH] perf stat: Disable NMI watchdog message on hybrid

If we run a single workload that only runs on big core, there is always a
ugly message about disabling the NMI watchdog because the atom is not
counted.

Before:

  # perf stat ls
  ...

   Performance counter stats for 'ls':

                0.94 msec task-clock                #    0.620 CPUs utilized
                   0      context-switches          #    0.000 /sec
                   0      cpu-migrations            #    0.000 /sec
                 111      page-faults               #  118.603 K/sec
           3,111,368      cpu_core/cycles/          #    3.324 G/sec
       <not counted>      cpu_atom/cycles/                                              (0.00%)
           2,965,942      cpu_core/instructions/    #    3.169 G/sec
       <not counted>      cpu_atom/instructions/                                        (0.00%)
             596,579      cpu_core/branches/        #  637.442 M/sec
       <not counted>      cpu_atom/branches/                                            (0.00%)
              15,744      cpu_core/branch-misses/   #   16.822 M/sec
       <not counted>      cpu_atom/branch-misses/                                       (0.00%)

         0.001509271 seconds time elapsed

         0.001572000 seconds user
         0.000000000 seconds sys

  Some events weren't counted. Try disabling the NMI watchdog:
          echo 0 > /proc/sys/kernel/nmi_watchdog
          perf stat ...
          echo 1 > /proc/sys/kernel/nmi_watchdog

Now we disable the NMI watchdog message on hybrid, otherwise there
are too many false positives.

After:

  # perf stat ls
  ...

   Performance counter stats for 'ls':

                2.32 msec task-clock                #    0.712 CPUs utilized
                   0      context-switches          #    0.000 /sec
                   0      cpu-migrations            #    0.000 /sec
                 110      page-faults               #   47.327 K/sec
           2,313,349      cpu_core/cycles/          #  995.308 M/sec
       <not counted>      cpu_atom/cycles/                                              (0.00%)
           2,986,113      cpu_core/instructions/    #    1.285 G/sec
       <not counted>      cpu_atom/instructions/                                        (0.00%)
             598,861      cpu_core/branches/        #  257.657 M/sec
       <not counted>      cpu_atom/branches/                                            (0.00%)
              16,090      cpu_core/branch-misses/   #    6.923 M/sec
       <not counted>      cpu_atom/branch-misses/                                       (0.00%)

         0.003265716 seconds time elapsed

         0.000000000 seconds user
         0.003307000 seconds sys

Signed-off-by: Jin Yao <yao.jin@...ux.intel.com>
Reviewed-by: Andi Kleen <ak@...ux.intel.com>
---
 tools/perf/util/stat-display.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c
index b759dfd633b4..db3c7a105a2b 100644
--- a/tools/perf/util/stat-display.c
+++ b/tools/perf/util/stat-display.c
@@ -465,7 +465,8 @@ static void printout(struct perf_stat_config *config, struct aggr_cpu_id id, int
 			config->csv_sep);
 
 		if (counter->supported) {
-			config->print_free_counters_hint = 1;
+			if (!perf_pmu__is_hybrid(counter->pmu_name))
+				config->print_free_counters_hint = 1;
 			if (is_mixed_hw_group(counter))
 				config->print_mixed_hw_group_error = 1;
 		}
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ