* [Intel-gfx] [PATCH v3] ALSA: hda/i915 - avoid hung task timeout in i915 wait
@ 2022-03-09 18:24 Kai Vehmanen
2022-03-09 19:59 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for ALSA: hda/i915 - avoid hung task timeout in i915 wait (rev3) Patchwork
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Kai Vehmanen @ 2022-03-09 18:24 UTC (permalink / raw)
To: alsa-devel, tiwai; +Cc: intel-gfx, lucas.demarchi, amadeuszx.slawinski
If kernel is built with hung task detection enabled and
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT set to less than 60 seconds,
snd_hdac_i915_init() will trigger the hung task timeout in case i915 is
not available and taint the kernel.
Use wait_for_completion_killable_timeout() for the wait to
avoid this problem.
Co-developed-by: Ramalingam C <ramalingam.c@intel.com>
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
sound/hda/hdac_i915.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Changes V2->V3:
- drop the loop and just use
wait_for_completion_killable_timeout() (feedback from Tvrtko Ursulin)
- new approach, so dropped the previous reviewed-by tags
diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c
index 454474ac5716..efe810af28c5 100644
--- a/sound/hda/hdac_i915.c
+++ b/sound/hda/hdac_i915.c
@@ -160,8 +160,8 @@ int snd_hdac_i915_init(struct hdac_bus *bus)
if (!IS_ENABLED(CONFIG_MODULES) ||
!request_module("i915")) {
/* 60s timeout */
- wait_for_completion_timeout(&acomp->master_bind_complete,
- msecs_to_jiffies(60 * 1000));
+ wait_for_completion_killable_timeout(&acomp->master_bind_complete,
+ msecs_to_jiffies(60 * 1000));
}
}
if (!acomp->ops) {
base-commit: 3a0099a1909dea6022690b0ae496938dd2e5771c
--
2.35.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Intel-gfx] ✗ Fi.CI.BUILD: failure for ALSA: hda/i915 - avoid hung task timeout in i915 wait (rev3)
2022-03-09 18:24 [Intel-gfx] [PATCH v3] ALSA: hda/i915 - avoid hung task timeout in i915 wait Kai Vehmanen
@ 2022-03-09 19:59 ` Patchwork
2022-03-10 13:15 ` [Intel-gfx] [PATCH v3] ALSA: hda/i915 - avoid hung task timeout in i915 wait Tvrtko Ursulin
2022-03-10 13:36 ` Takashi Iwai
2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2022-03-09 19:59 UTC (permalink / raw)
To: Kai Vehmanen; +Cc: intel-gfx
== Series Details ==
Series: ALSA: hda/i915 - avoid hung task timeout in i915 wait (rev3)
URL : https://patchwork.freedesktop.org/series/101156/
State : failure
== Summary ==
Applying: ALSA: hda/i915 - avoid hung task timeout in i915 wait
Using index info to reconstruct a base tree...
M sound/hda/hdac_i915.c
Falling back to patching base and 3-way merge...
Auto-merging sound/hda/hdac_i915.c
CONFLICT (content): Merge conflict in sound/hda/hdac_i915.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 ALSA: hda/i915 - avoid hung task timeout in i915 wait
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Intel-gfx] [PATCH v3] ALSA: hda/i915 - avoid hung task timeout in i915 wait
2022-03-09 18:24 [Intel-gfx] [PATCH v3] ALSA: hda/i915 - avoid hung task timeout in i915 wait Kai Vehmanen
2022-03-09 19:59 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for ALSA: hda/i915 - avoid hung task timeout in i915 wait (rev3) Patchwork
@ 2022-03-10 13:15 ` Tvrtko Ursulin
2022-03-10 13:36 ` Takashi Iwai
2 siblings, 0 replies; 4+ messages in thread
From: Tvrtko Ursulin @ 2022-03-10 13:15 UTC (permalink / raw)
To: Kai Vehmanen, alsa-devel, tiwai
Cc: intel-gfx, lucas.demarchi, amadeuszx.slawinski
On 09/03/2022 18:24, Kai Vehmanen wrote:
> If kernel is built with hung task detection enabled and
> CONFIG_DEFAULT_HUNG_TASK_TIMEOUT set to less than 60 seconds,
> snd_hdac_i915_init() will trigger the hung task timeout in case i915 is
> not available and taint the kernel.
>
> Use wait_for_completion_killable_timeout() for the wait to
> avoid this problem.
>
> Co-developed-by: Ramalingam C <ramalingam.c@intel.com>
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
> ---
> sound/hda/hdac_i915.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Changes V2->V3:
> - drop the loop and just use
> wait_for_completion_killable_timeout() (feedback from Tvrtko Ursulin)
> - new approach, so dropped the previous reviewed-by tags
>
> diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c
> index 454474ac5716..efe810af28c5 100644
> --- a/sound/hda/hdac_i915.c
> +++ b/sound/hda/hdac_i915.c
> @@ -160,8 +160,8 @@ int snd_hdac_i915_init(struct hdac_bus *bus)
> if (!IS_ENABLED(CONFIG_MODULES) ||
> !request_module("i915")) {
> /* 60s timeout */
> - wait_for_completion_timeout(&acomp->master_bind_complete,
> - msecs_to_jiffies(60 * 1000));
> + wait_for_completion_killable_timeout(&acomp->master_bind_complete,
> + msecs_to_jiffies(60 * 1000));
> }
> }
> if (!acomp->ops) {
Works for me, as discussed I think this is more correct.
Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
>
> base-commit: 3a0099a1909dea6022690b0ae496938dd2e5771c
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Intel-gfx] [PATCH v3] ALSA: hda/i915 - avoid hung task timeout in i915 wait
2022-03-09 18:24 [Intel-gfx] [PATCH v3] ALSA: hda/i915 - avoid hung task timeout in i915 wait Kai Vehmanen
2022-03-09 19:59 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for ALSA: hda/i915 - avoid hung task timeout in i915 wait (rev3) Patchwork
2022-03-10 13:15 ` [Intel-gfx] [PATCH v3] ALSA: hda/i915 - avoid hung task timeout in i915 wait Tvrtko Ursulin
@ 2022-03-10 13:36 ` Takashi Iwai
2 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2022-03-10 13:36 UTC (permalink / raw)
To: Kai Vehmanen; +Cc: alsa-devel, intel-gfx, lucas.demarchi, amadeuszx.slawinski
On Wed, 09 Mar 2022 19:24:39 +0100,
Kai Vehmanen wrote:
>
> If kernel is built with hung task detection enabled and
> CONFIG_DEFAULT_HUNG_TASK_TIMEOUT set to less than 60 seconds,
> snd_hdac_i915_init() will trigger the hung task timeout in case i915 is
> not available and taint the kernel.
>
> Use wait_for_completion_killable_timeout() for the wait to
> avoid this problem.
>
> Co-developed-by: Ramalingam C <ramalingam.c@intel.com>
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Applied now. Thanks.
Takashi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-03-10 13:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-09 18:24 [Intel-gfx] [PATCH v3] ALSA: hda/i915 - avoid hung task timeout in i915 wait Kai Vehmanen
2022-03-09 19:59 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for ALSA: hda/i915 - avoid hung task timeout in i915 wait (rev3) Patchwork
2022-03-10 13:15 ` [Intel-gfx] [PATCH v3] ALSA: hda/i915 - avoid hung task timeout in i915 wait Tvrtko Ursulin
2022-03-10 13:36 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox