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: <a1adb737-f126-ecec-9bca-a1b5bdb76156@intel.com>
Date:   Wed, 10 Mar 2021 08:50:06 -0800
From:   Dave Hansen <dave.hansen@...el.com>
To:     kan.liang@...ux.intel.com, peterz@...radead.org, mingo@...nel.org,
        linux-kernel@...r.kernel.org
Cc:     acme@...nel.org, tglx@...utronix.de, bp@...en8.de,
        namhyung@...nel.org, jolsa@...hat.com, ak@...ux.intel.com,
        yao.jin@...ux.intel.com, alexander.shishkin@...ux.intel.com,
        adrian.hunter@...el.com
Subject: Re: [PATCH V2 16/25] perf/x86: Register hybrid PMUs

On 3/10/21 8:37 AM, kan.liang@...ux.intel.com wrote:
> -	err = perf_pmu_register(&pmu, "cpu", PERF_TYPE_RAW);
> -	if (err)
> -		goto out2;
> +	if (!is_hybrid()) {
> +		err = perf_pmu_register(&pmu, "cpu", PERF_TYPE_RAW);
> +		if (err)
> +			goto out2;
> +	} else {
> +		u8 cpu_type = get_hybrid_cpu_type(smp_processor_id());
> +		struct x86_hybrid_pmu *hybrid_pmu;
> +		int i;

Where's the preempt_disable()?

> +static void init_hybrid_pmu(int cpu)
> +{
> +	unsigned int fixed_mask, unused_eax, unused_ebx, unused_edx;
> +	struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu);
> +	u8 cpu_type = get_hybrid_cpu_type(cpu);
> +	struct x86_hybrid_pmu *pmu = NULL;
> +	struct perf_cpu_context *cpuctx;
> +	int i;

Ditto.

Are we really sure the IPIs are worth the trouble?  Why don't we just
cache the leaf when we bring the CPU up like just about every other
thing we read from CPUID?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ