Git Product home page Git Product logo

Comments (7)

adrianreber avatar adrianreber commented on June 2, 2024

Not really and that is the beauty of it.

You probably can detect migration by comparing MAC addresses and information from the system, but a checkpoint should not really be detectable.

Before the time namespace existed we have seen that database detect migration by reading clock monotonic and if it jumps it aborts. You could also read the local clock monotonic and if it jumps too much you could say it might be checkpointed, but I doubt that this works reliably.

If you want to signal your process that it was checkpointed you could send a signal using an action script.

I think it is really difficult to detect.

Maybe someone else has additional information.

from criu.

FuwuerRyu avatar FuwuerRyu commented on June 2, 2024

Not really and that is the beauty of it.

You probably can detect migration by comparing MAC addresses and information from the system, but a checkpoint should not really be detectable.

Before the time namespace existed we have seen that database detect migration by reading clock monotonic and if it jumps it aborts. You could also read the local clock monotonic and if it jumps too much you could say it might be checkpointed, but I doubt that this works reliably.

If you want to signal your process that it was checkpointed you could send a signal using an action script.

I think it is really difficult to detect.

Maybe someone else has additional information.

Could you let me know how criu stop the process before dumping it

from criu.

adrianreber avatar adrianreber commented on June 2, 2024

Could you let me know how criu stop the process before dumping it

This is something which documented quite well. Either ptrace or cgroup freezer.

from criu.

adrianreber avatar adrianreber commented on June 2, 2024

Why are you asking this question? If you would tell us what your goal is we could maybe help you better.

from criu.

FuwuerRyu avatar FuwuerRyu commented on June 2, 2024

Why are you asking this question? If you would tell us what your goal is we could maybe help you better.

Thank you very much.
I am trying to migrate GPU APP with criu, so I need to dump GPU resource after criu freeze it and before criu dumpe it.
If I can get the signal of freezing, I can store all GPU resources before dumping.

from criu.

adrianreber avatar adrianreber commented on June 2, 2024

Why are you asking this question? If you would tell us what your goal is we could maybe help you better.

Thank you very much. I am trying to migrate GPU APP with criu, so I need to dump GPU resource after criu freeze it and before criu dumpe it. If I can get the signal of freezing, I can store all GPU resources before dumping.

Okay, if you control your application you can just use CRIU's action-scripts to send a signal (man 7 signal) for example. Once your applications receives your custom signal you can handle the GPU resources and once that is done CRIU can dump the non-GPU part of the process. Or you could create a file somewhere and if that file exists you can do something in you application. Or open a socket. If you control your application it should be easy to do.

from criu.

FuwuerRyu avatar FuwuerRyu commented on June 2, 2024

Got it. Good idea. Thank you very much again!

from criu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.