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

From: Pavel Begunkov
Date: Wed Jul 10 2024 - 13:53:26 EST


On 7/10/24 01:54, Tejun Heo wrote:
Hello,

On Tue, Jul 09, 2024 at 08:55:43PM +0100, Pavel Begunkov wrote:
...
CRIU, I assume. I'll try it ...

Than I think we can forget about task_works and this patch. CRIU dumps
the tasks in TASK_TRACED state.

And would be hard to test, io_uring (the main source of task_work)
is not supported

(00.466022) Error (criu/proc_parse.c:477): Unknown shit 600 (anon_inode:[io_uring])
...
(00.467642) Unfreezing tasks into 1
(00.467656) Unseizing 15488 into 1
(00.468149) Error (criu/cr-dump.c:2111): Dumping FAILED.

Yeah, the question is: If CRIU is to use cgroup freezer to freeze the tasks
and then go around tracing each to make dump, would the freezer be enough in
avoiding interim state changes? Using CRIU implementation is a bit arbitrary
but I think checkpoint-restart is a useful bar to measure what should stay
stable while a cgroup is frozen.

Sounds like in the long run we might want to ignore task_work while
it's frozen, but hard to say for all task_work users.

--
Pavel Begunkov