criu
criu copied to clipboard
criu: dump and restore cpu affinity of each thread
Criu should dump and restore threads' or processes' cpu affinity.
Add one entry of thread_cpuallow_entry into thread_core_entry to save cpu affinity info.
Restore it after threads restored but before running.
Add option --with-cpu-affinity to enable this function at restore.
Signed-off-by: Sang Yan [email protected]
you need to implement a zdtm test. Here are our static tests: https://github.com/checkpoint-restore/criu/tree/criu-dev/test/zdtm/static
This is an example of how to run them: python test/zdtm.py run -t zdtm/static/env00
How does it work when we restore processes on a host with more or less cpu-s?
How does it work when we restore processes on a host with more or less cpu-s?
There's probably no good way to resolve it on a host with more or less cpu-s. I propose to add a options for this function.
@avagin How many cpus in the zdtm/test CI environmet ? I added one test case of zdtm/static/cpu-affinity0 with 4 cores affinity dump and restore, and it failed. Now I tested only one cpu's affinity restore ok.
Please review the commit.
Thanks.
@avagin How many cpus in the zdtm/test CI environmet ? I added one test case of zdtm/static/cpu-affinity0 with 4 cores affinity dump and restore, and it failed. Now I tested only one cpu's affinity restore ok.
Each CI environment has a different number of CPUs. You need to figure out the number of available CPUs in the test dynamically.
Please also update the man-page and add your new CLI option to the RPC and libcriu interface.
I would prefer to not merge this before we have more CI tests running again.
A friendly reminder that this PR had no activity for 30 days.
Closing in favour of https://github.com/checkpoint-restore/criu/pull/1969