Re: [PATCH 1/3 v4] perf/x86/intel/uncore: Cache logical pkg id in uncore driver

From: Thomas Gleixner
Date: Wed Nov 01 2017 - 12:30:42 EST


On Wed, 25 Oct 2017, Prarit Bhargava wrote:

> From: Andi Kleen <ak@xxxxxxxxxxxxxxx>
>
> The SNB-EP uncore driver is the only user of topology_phys_to_logical_pkg
> in a performance critical path. Change it query the logical pkg ID
> only once at initialization time and then cache it in box structure.

That second sentence needs some care:

Avoid the lookup in the hotpath and cache the id at initialization
time. This is also a prerequisite to change the underlying logical
package management implementation w/o impacting this driver.

Other than that.

Reviewed-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>