Re: [PATCH 2/2] drm/i915/pmu: Only allow running on a single CPU

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

 




On 23/11/2017 12:50, Chris Wilson wrote:
Quoting Tvrtko Ursulin (2017-11-23 12:34:32)
From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>

We do two things, both of which are purely to simplify and clarify the
implementation:

1.

Simplify the CPU online callback so it is more obvious that the purpose
there is to set a single CPU mask bit for the first CPU which comes
online. Using cpumask_weight for this reads more obvious than the trick
with cpumask_and_any.

2.

Modify the event init so that events can be created only on a single CPU.

This removes looking at the requested CPU thread siblings, and only allows
creating on the current active CPU.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Dmitry Rogozhkin <dmitry.v.rogozhkin@xxxxxxxxx>

Works for me.
Tested-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

As much as I understand this (which is not a lot!),
Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

Thanks, now waiting for results!

Your patch (1/2) is the main fix here, without it the cpumask is not initialized on !hotplug kernels hence -ENODEV on everything.

This patch is mostly making the code more obvious. I am not sure that the addition of rejecting thread siblings actually changes anything. Perf stat at least seems to only try to init one event per real core and seems to be skipping thread siblings. So it just makes it more obvious we really want to only run on a single CPU.

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