[PATCH 3/6] watchdog

Chris Wilson chris at chris-wilson.co.uk
Tue Jan 12 21:02:21 UTC 2021


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.

For the record, this is not the watchdog I wanted as it does not do
_endless_.
-Chris


More information about the Intel-gfx-trybot mailing list