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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201026152108.GW466880@tassilo.jf.intel.com>
Date:   Mon, 26 Oct 2020 08:21:08 -0700
From:   Andi Kleen <ak@...ux.intel.com>
To:     Namhyung Kim <namhyung@...nel.org>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Jiri Olsa <jolsa@...hat.com>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Ingo Molnar <mingo@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Stephane Eranian <eranian@...gle.com>,
        Ian Rogers <irogers@...gle.com>
Subject: Re: [RFC] perf evlist: Warn if event group has mixed sw/hw events

On Mon, Oct 26, 2020 at 11:19:37PM +0900, Namhyung Kim wrote:
> This patch just added a warning before running it.  I'd really want to
> fix the kernel if possible but don't have a good idea.  Thoughts?

The easiest fix would be some multi threading in perf stat opening, then then
extra latencies could be mostly hidden. One thread per group would probably
be overkill, but just a few threads would lower the penalty significantly.

I think that would be better than this patch and it's likely not that much
more complicated, as this is already a lot of code.

> +{
> +	const char *known_sw_pmu[] = {
> +		"software", "tracepoint", "breakpoint", "kprobe", "uprobe", "msr"

That's a non scalable approach. New pmus get added regularly. It would be better to
indicate this in a generic way from the kernel.

> +			pr_warning("WARNING: Event group has mixed hw/sw events.\n"
> +				   "This will slow down the perf_event_open syscall.\n"
> +				   "Consider putting a hw event as a leader.\n\n");

You really need to tell the user which group, otherwise it is hard to find
in a large command line.


-Andi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ