Git Product home page Git Product logo

Comments (16)

Furisto avatar Furisto commented on August 28, 2024 3

@utam0k @tsturzl
I am planning to have a PR ready the day after tomorrow

from youki.

Furisto avatar Furisto commented on August 28, 2024 2

Sure, would be happy to help. How do you want to proceed @utam0k ? I thought about getting through the references and then attempting a spike of the cgroup v2 manager.

from youki.

utam0k avatar utam0k commented on August 28, 2024 1

@Furisto
I took a look at your commit. As a first step it was exactly what I imagined. I think it's a good policy.
Can I assign this problem to you?
If it looks like it needs to be handled by a variety of controllers, I think it would be a good idea to provide an example like in v1 to give others a chance to try.

from youki.

utam0k avatar utam0k commented on August 28, 2024

@Furisto
It is a very good idea as a first step. I think an eventual implementation like the crun about it would be nice.
https://github.com/containers/crun/blob/master/crun.1.md#cgroup-v2

I thought about getting through the references and then attempting a spike of the cgroup v2 manager.

I'd love to hear other people's opinions as well as mine, so please let me know what you think.
If you are interested, you can try to implement a cgroups v2 manager?

from youki.

Furisto avatar Furisto commented on August 28, 2024

Progress can be seen here: https://github.com/Furisto/youki/tree/cgroupv2. I am currently fleshing out the cgroups v2 manager and 1-2 subsystems.

from youki.

Furisto avatar Furisto commented on August 28, 2024

@utam0k
You can assign it to me. Yes, the idea is to do the first one or two myself and then the rest can be done by other people.

from youki.

utam0k avatar utam0k commented on August 28, 2024

@Furisto I assigned you. I look forward to your PR!

from youki.

utam0k avatar utam0k commented on August 28, 2024

@Furisto cc: @tsturzl
I decided to make cgroups v2 support a key feature for the first release of youki.
I'm looking forward to it.

from youki.

utam0k avatar utam0k commented on August 28, 2024

@Furisto Wow! I am amazed at how fast you work.

from youki.

utam0k avatar utam0k commented on August 28, 2024

@Furisto
Thanks for your hard work in supporting v2. It was very nice work!

BTW, I'd like to talk to you about how to proceed with v2 support for each subsystem.
I think it is better to proceed with the project in the same way as utam0k#9.
What do you think about it?

from youki.

Furisto avatar Furisto commented on August 28, 2024

@utam0k
I think it is a good idea. I am investigating one open issue, once that is solved we can split up the work for the different subsystems. The issue is that the cgroup manager gets the pid of youki and not of the container process. If i do this

sudo docker run -d --rm -m 30m --runtime youki progrium/stress --cpu 2

then the process tree looks like this:

root       13519       1  0 00:19 ?        00:00:00 /usr/bin/containerd-shim-runc-v2 -namespace moby -id 509e2e3131d50c63d599a
root       13530   13519  0 00:19 pts/24   00:00:00  \_ /home/furisto/Projects/Existing/youki-me/target/x86_64-unknown-linux-gnu/d
root       13531   13530  0 00:19 pts/24   00:00:00      \_ /usr/bin/stress --verbose --cpu 2 
root       13538   13531 99 00:19 pts/24   00:00:03          \_ /usr/bin/stress --verbose --cpu 2 
root       13539   13531 99 00:19 pts/24   00:00:03          \_ /usr/bin/stress --verbose --cpu 2 

The cgroup manager gets pid 13530, not 13531. We also seem to call apply too late during create, because 13538, 13539 and 13531 end up in the containerd.slice not in the cgroup created by youki. That must mean that when these processes are forked their parent is not yet in the correct cgroup.

from youki.

utam0k avatar utam0k commented on August 28, 2024

@Furisto
Maybe applying cmanager in fork_init() instead of fork_first() will fix it.
https://github.com/utam0k/youki/blob/52b9a15d5168b590770d5aa79f9cebdee04d7604/src/process/fork.rs#L56

The flow in this image is old, and some of it may be wrong, but it's about right.
image

from youki.

utam0k avatar utam0k commented on August 28, 2024

@Furisto Hi! I think the problem mentioned above was solved by #69. So Can I create a tracking issue to implement some subsystems for cgv2?

from youki.

Furisto avatar Furisto commented on August 28, 2024

@utam0k Yes, you can!

from youki.

utam0k avatar utam0k commented on August 28, 2024

I created #78.
Let's continue with cgv2 support in this issue!

from youki.

utam0k avatar utam0k commented on August 28, 2024

Special thanks to @Furisto

from youki.

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.