criu icon indicating copy to clipboard operation
criu copied to clipboard

criu: dump and restore cpu affinity of each thread

Open snoweay opened this issue 4 years ago • 7 comments

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]

snoweay avatar Nov 26 '20 13:11 snoweay

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

avagin avatar Nov 29 '20 04:11 avagin

How does it work when we restore processes on a host with more or less cpu-s?

avagin avatar Dec 01 '20 16:12 avagin

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.

snoweay avatar Dec 19 '20 06:12 snoweay

@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.

snoweay avatar Dec 22 '20 14:12 snoweay

@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.

adrianreber avatar Dec 22 '20 14:12 adrianreber

I would prefer to not merge this before we have more CI tests running again.

adrianreber avatar Dec 22 '20 15:12 adrianreber

A friendly reminder that this PR had no activity for 30 days.

github-actions[bot] avatar Jan 22 '21 00:01 github-actions[bot]

Closing in favour of https://github.com/checkpoint-restore/criu/pull/1969

rst0git avatar Sep 12 '22 21:09 rst0git