[PATCH v12 1/4] lib: add generic support for reading PMU events

Morten Brørup mb at smartsharesystems.com
Sun Oct 6 16:30:03 CEST 2024


> From: Tomasz Duszynski [mailto:tduszynski at marvell.com]
> Sent: Saturday, 28 September 2024 00.06

> +int
> +rte_pmu_init(void)
> +{
> +	int ret;
> +
> +	/* Allow calling init from multiple contexts within a single
> thread. This simplifies
> +	 * resource management a bit e.g in case fast-path tracepoint has
> already been enabled
> +	 * via command line but application doesn't care enough and
> performs init/fini again.
> +	 */
> +	if (rte_pmu.initialized != 0) {
> +		rte_pmu.initialized++;

This increment is not multithread safe, does it need to be?

Same about the decrement in rte_pmu_fini().

> +		return 0;
> +	}

With the above fixed, or if it doesn't need fixing,

For the series,
Acked-by: Morten Brørup <mb at smartsharesystems.com>

Thank you for resuming work on this. :-)



More information about the dev mailing list