Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support user set remote mmap vma address #2461

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

duguhaotian
Copy link
Contributor

@duguhaotian duguhaotian commented Aug 6, 2024

  1. os auto assignment vma addr maybe conflict with vma in gpu living migrate scene;
  2. so, we should give choice to user;
  3. default, user_set_remote_map is 0L, so we donot change default behave;

user set vma usecase:

// we use compel/test/infect/spy.c to show example

static int do_infection(int pid)
{
       ... ....
	ictx = compel_infect_ctx(ctl);
	ictx->log_fd = STDERR_FILENO;

       // TODO: use should set assignment vma addr at here
      ictx->user_set_remote_map = xxxxL;

	parasite_setup_c_header(ctl);
       .... .....
}

@rst0git
Copy link
Member

rst0git commented Aug 6, 2024

os auto assignment vma addr maybe conflict with vma in gpu living migrate scene;

There are several different methods for checkpoint/restore of GPU state (e.g., cuda-checkpoint, amdgpu plugin, cricket, cedana, a device-proxy mechanism from Microsoft, and a very similar solution from Tencent).

@duguhaotian Would you be able to provide more information about this use-case and why this change is necessary?

@duguhaotian
Copy link
Contributor Author

os auto assignment vma addr maybe conflict with vma in gpu living migrate scene;

There are several different methods for checkpoint/restore of GPU state (e.g., cuda-checkpoint, amdgpu plugin, cricket, cedana, a device-proxy mechanism from Microsoft, and a very similar solution from Tencent).

@duguhaotian Would you be able to provide more information about this use-case and why this change is necessary?

similar solution from Microsoft, log and reply.

  1. But, i encountered a log: mmap vma address and do somethings.
  2. So, i should reply this mmap vma and do somethings.
  3. And then, probabilistic failure if criu vma address same to log vma address;

@duguhaotian
Copy link
Contributor Author

@rst0git

compel/src/lib/infect.c Outdated Show resolved Hide resolved
@duguhaotian duguhaotian force-pushed the criu-dev branch 2 times, most recently from 5fa3ab4 to 57ec59b Compare August 8, 2024 07:33
@duguhaotian
Copy link
Contributor Author

@avagin @rst0git please check this pr, thks.

compel/src/lib/infect.c Outdated Show resolved Hide resolved
@avagin
Copy link
Member

avagin commented Aug 14, 2024

LGTM pls resolve all items and we will merge it.

btw: how and where do you use this?

1. os auto assignment vma addr maybe conflict with vma in gpu living migrate scene;
2. so, we should give choice to user;

Signed-off-by: haozi007 <[email protected]>
@duguhaotian
Copy link
Contributor Author

duguhaotian commented Aug 15, 2024

LGTM pls resolve all items and we will merge it.

btw: how and where do you use this?

greate, thks!! @avagin

  1. pr comments show how to use it;
  2. log/reply to restore state of xpu, We encountered a mmap address conflict, causing the parasitic code execution to get stuck

@avagin avagin merged commit 6d4eeb7 into checkpoint-restore:criu-dev Aug 15, 2024
36 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants