[PATCH 3/6] watchdog
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Wed Jan 13 09:23:43 UTC 2021
On 12/01/2021 21:02, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2021-01-12 17:22:17)
>> +static enum hrtimer_restart request_watchdog_expired(struct hrtimer *hrtimer)
>> +{
>> + struct i915_request *rq =
>> + container_of(hrtimer, struct i915_request, watchdog.timer);
>> +
>> + if (i915_request_get_rcu(rq)) {
>
> This loses the battle against SLAB_TYPESAFE_BY_RCU. You would need to
> hold the reference in setting up the hrtimer, and conditionally drop it
> on cancelling. Then use if (!i915_request_competed()) to avoid setting
> up another interrupt callback as cancellation can then just be done
> lazily during retire.
Yes thanks, I even had it like that at some point. Don't remember now
why I changed it.. Probably to avoid having to drop references on cancel
ie. to optimise the normal path. But it doesn't work as you say..
> For the record, this is not the watchdog I wanted as it does not do
> _endless_.
I know..
I was considering maybe defining an uapi struct with flags and enough
rsvd fields, so later same context param could be used for different
watchdog flavours, but gave up on that for now since the requirements
even for this most rudimentary one are a bit unclear.
Regards,
Tvrtko
More information about the Intel-gfx-trybot
mailing list