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]
Date:   Fri, 12 Nov 2021 17:25:01 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Stephane Eranian <eranian@...gle.com>
Cc:     linux-kernel@...r.kernel.org, kim.phillips@....com,
        acme@...hat.com, jolsa@...hat.com, songliubraving@...com,
        mpe@...erman.id.au, maddy@...ux.ibm.com
Subject: Re: [PATCH v2 03/13] perf/x86/amd: add AMD Fam19h Branch Sampling
 support

On Thu, Nov 11, 2021 at 12:44:05AM -0800, Stephane Eranian wrote:
> @@ -989,6 +1165,23 @@ static int __init amd_core_pmu_init(void)
>  		x86_pmu.flags |= PMU_FL_PAIR;
>  	}
>  
> +	if (boot_cpu_data.x86 >= 0x19) {
> +		/*
> +		 * On AMD, invoking pmu_disable_all() is very expensive and the function is
> +		 * invoked on context-switch in via sched_task_in(), so enable only when necessary
> +		 */

Well, it only gets called when brs is in use, so afaict the above
comment is a bit misleading. Still no point in installing that function
when there it no point for it.

> +		if (!amd_brs_init()) {
> +			x86_pmu.get_event_constraints = amd_get_event_constraints_f19h;
> +			x86_pmu.sched_task = amd_pmu_sched_task;
> +			/*
> +			 * The put_event_constraints callback is shared with
> +			 * Fam17h, set above
> +			 */
> +		}
> +	}
> +
> +	x86_pmu.attr_update = amd_attr_update;
> +
>  	pr_cont("core perfctr, ");
>  	return 0;
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ