lkml.org 
[lkml]   [2018]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] signals: Allow generation of SIGKILL to exiting task.
On 04/24, Andrey Grodzovsky wrote:
>
> Currently calling wait_event_killable as part of exiting process
> will stall forever since SIGKILL generation is suppresed by PF_EXITING.

See my reply to 2/3,

> In our partilaur case AMDGPU driver wants to flush all GPU jobs in
> flight before shutting down. But if some job hangs the pipe we still want to
> be able to kill it and avoid a process in D state.

this patch won't really help in multi-threaded case,

> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -886,10 +886,10 @@ static inline int wants_signal(int sig, struct task_struct *p)
> {
> if (sigismember(&p->blocked, sig))
> return 0;
> - if (p->flags & PF_EXITING)
> - return 0;
> if (sig == SIGKILL)
> return 1;
> + if (p->flags & PF_EXITING)
> + return 0;

So you want to trigger signal_wake_up() at the end of complete_signal().

Unless you use tkill() you can wake another thread, not the thread blocked
in drm_sched_entity_fini().

And if the whole process is already dying complete_signal() will do nothing
else.

Oleg.

\
 
 \ /
  Last update: 2018-04-25 15:14    [W:0.268 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site