Re: [PATCH 1/2] drm/i915/pmu: Limit the selection of the dedicated reader cpu to an online sibling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 22/11/2017 18:26, Chris Wilson wrote:
When bringing a cpu online, we want to see if it or a sibling is already
in the online mask before adding to the designated reader.

Fixes: b46a33e271ed ("drm/i915/pmu: Expose a PMU interface for perf queries")
Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
Cc: Dmitry Rogozhkin <dmitry.v.rogozhkin@xxxxxxxxx>
---
  drivers/gpu/drm/i915/i915_pmu.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
index 1071935bfa67..64e36d72e76a 100644
--- a/drivers/gpu/drm/i915/i915_pmu.c
+++ b/drivers/gpu/drm/i915/i915_pmu.c
@@ -750,7 +750,8 @@ static int i915_pmu_cpu_online(unsigned int cpu, struct hlist_node *node)
GEM_BUG_ON(!pmu->base.event_init); - target = cpumask_any_and(&i915_pmu_cpumask, &i915_pmu_cpumask);
+	target = cpumask_any_and(&i915_pmu_cpumask,
+				 topology_sibling_cpumask(cpu));
  	/* Select the first online CPU as a designated reader. */
  	if (target >= nr_cpu_ids)
  		cpumask_set_cpu(cpu, &i915_pmu_cpumask);

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux