Re: [PATCH 2/2] kernel: rerun task_work while freezing in get_signal()

From: Tejun Heo
Date: Wed Jul 10 2024 - 15:20:43 EST


Hello,

On Wed, Jul 10, 2024 at 09:10:16PM +0200, Oleg Nesterov wrote:
...
> If nothing else. CRIU needs to attach and make this task TASK_TRACED, right?

Yeah, AFAIK, that's the only way to implement check-pointing for now.

> And once the target task is traced, it won't react to task_work_add(TWA_SIGNAL).

I don't know how task_work is being used but the requirement would be that
if a cgroup is frozen, task_works shouldn't be making state changes which
can't safely be replayed (e.g. by restarting the frozen syscalls). If
anything task_works do can just be reproduced by restarting the currently
in-flight and frozen syscalls, it should be okay to leave them running.
Otherwise, it'd be better to freeze them together. As this thing is kinda
difficult to reason about, it'd probably be easier to just freeze them
together if we can.

Thanks.

--
tejun