Skip to contentSkip to conversation

drm/i915: Reboot CI if we get wedged during driver init

PATCH Superseded Michał Winiarski 3 participants 4 messages Jul 1, 2020

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Reboot CI if we get wedged during driver init

From: Michał Winiarski <[email protected]>

Getting wedged device on driver init is pretty much unrecoverable. Since we're running verious scenarios that may potentially hit this in CI (module reload / selftests / hotunplug), and if it happens, it means that we can't trust any subsequent CI results, we should just apply the taint to let the CI know that it should reboot (CI checks taint between test runs).

Cc Chris Wilson <[email protected]>
Cc Petri Latvala <[email protected]>
---
 drivers/gpu/drm/i915/gt/intel_reset.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/i915/gt/intel_reset.c +2 -0
index 0156f1f5c736..d27e8bb7d550 100644
@@ -1360,6 +1360,8 @@ void intel_gt_set_wedged_on_init(struct intel_gt *gt)
 		     I915_WEDGED_ON_INIT);
 	intel_gt_set_wedged(gt);
 	set_bit(I915_WEDGED_ON_INIT, &gt->reset.flags);
+
+	add_taint_for_CI(TAINT_WARN);
 }
 
 void intel_gt_init_reset(struct intel_gt *gt)
Signature · 6 lines
2.27.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#1 lore raw

Quoting Michał Winiarski (2020-07-01 16:07:21)

Quoted 8 lines

From: Michał Winiarski <[email protected]>

Getting wedged device on driver init is pretty much unrecoverable. Since we're running verious scenarios that may potentially hit this in CI (module reload / selftests / hotunplug), and if it happens, it means that we can't trust any subsequent CI results, we should just apply the taint to let the CI know that it should reboot (CI checks taint between test runs).

Ok, we treat WEDGED_ON_INIT as non-recoverable [as opposed to the less wedged WEDGED].

Quoted 3 lines
Cc Chris Wilson <[email protected]>
Cc Petri Latvala <[email protected]>

-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
In reply to Michał Winiarski

Quoting Michał Winiarski (2020-07-01 16:07:21)

Quoted 21 lines

From: Michał Winiarski <[email protected]>

Getting wedged device on driver init is pretty much unrecoverable. Since we're running verious scenarios that may potentially hit this in CI (module reload / selftests / hotunplug), and if it happens, it means that we can't trust any subsequent CI results, we should just apply the taint to let the CI know that it should reboot (CI checks taint between test runs).

Cc Chris Wilson <[email protected]>
Cc Petri Latvala <[email protected]>
---
 drivers/gpu/drm/i915/gt/intel_reset.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/i915/gt/intel_reset.c +0 -0
index 0156f1f5c736..d27e8bb7d550 100644

drivers/gpu/drm/i915/gt/intel_reset.c void intel_gt_set_wedged_on_init(struct intel_gt *gt) · line 1363

Quoted 4 lines
drivers/gpu/drm/i915/gt/intel_reset.c +1 -0
@@ -1360,6 +1360,8 @@ void intel_gt_set_wedged_on_init(struct intel_gt *gt)
                     I915_WEDGED_ON_INIT);
        intel_gt_set_wedged(gt);
        set_bit(I915_WEDGED_ON_INIT, &gt->reset.flags);
+

Ah, we don't say around here that this WEDGED_ON_INIT is non-recoverable, could you please add a comment to that effect?

Quoted 7 lines
drivers/gpu/drm/i915/gt/intel_reset.c +1 -0
+       add_taint_for_CI(TAINT_WARN);
 }
 
 void intel_gt_init_reset(struct intel_gt *gt)
Signature · 1 line
2.27.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by
#3 lore raw
Quoted 5 lines · Chris Wilson

Quoting Michał Winiarski (2020-07-01 16:07:21)

Quoted 4 lines

From: Michał Winiarski <[email protected]>

Getting wedged device on driver init is pretty much unrecoverable. Since we're running verious scenarios that may potentially hit this in

typo

Quoted 12 lines
Quoted 12 lines

CI (module reload / selftests / hotunplug), and if it happens, it means that we can't trust any subsequent CI results, we should just apply the taint to let the CI know that it should reboot (CI checks taint between test runs).

Cc Chris Wilson <[email protected]>
Cc Petri Latvala <[email protected]>
---
 drivers/gpu/drm/i915/gt/intel_reset.c | 2 ++
 1 file changed, 2 insertions(+)
Quoted 13 lines

drivers/gpu/drm/i915/gt/intel_reset.c void intel_gt_set_wedged_on_init(struct intel_gt *gt) · line 1363

Quoted 9 lines
drivers/gpu/drm/i915/gt/intel_reset.c +1 -0
index 0156f1f5c736..d27e8bb7d550 100644
@@ -1360,6 +1360,8 @@ void intel_gt_set_wedged_on_init(struct intel_gt *gt)
                     I915_WEDGED_ON_INIT);
        intel_gt_set_wedged(gt);
        set_bit(I915_WEDGED_ON_INIT, &gt->reset.flags);
+

Ah, we don't say around here that this WEDGED_ON_INIT is non-recoverable, could you please add a comment to that effect?

Such comment is already in WEDGED_ON_INIT description, but repeating it will definitely help

Quoted 1 line

drivers/gpu/drm/i915/gt/intel_reset.c void intel_gt_set_wedged_on_init(struct intel_gt *gt) · line 1364

Quoted 1 line
drivers/gpu/drm/i915/gt/intel_reset.c +1 -0
+       add_taint_for_CI(TAINT_WARN);

btw, today we are tainting kernel for CI silently and from different places, so maybe it is worth to add there some debug log with __builtin_return_address() for better diagnose why we stopped CI?

with typo/comment fixed,

Quoted 11 lines
Quoted 6 lines
drivers/gpu/drm/i915/gt/intel_reset.c +0 -0
 }
 
 void intel_gt_init_reset(struct intel_gt *gt)
Signature · 1 line
2.27.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx