Giter VIP home page Giter VIP logo

Comments (2)

matu3ba avatar matu3ba commented on August 27, 2024

Here is an In-depth manual from 8 days ago at https://documentation.suse.com/sle-rt/12-SP5/single-html/SLE-RT-shielding/, upstream https://github.com/lpechacek/cpuset with issues.

Please note, that cset-shield is written in Python and GPLv2 and is a few thousand LOC.

The manual also describes some not nice quirks

Note. There is a minor chance that a task forks during move and its child remains in the root cpuset. 

I think the author did not want to deal with strace and/or pid 1/process group tracking, which is another level of complexity and inefficient in Python.

Afaiu, there are 4 things needed

    1. setup of shield configuration (creation of shield and moving tasks into it)
    1. running process with options
    1. teardown of shield configuration / reset of system state (moving tasks out and delete shield)
    1. Detection, if there is a current cpu shield running (including info how to clean it up manually)

I think a partial reimplementation in Zig should start with the quirk (process movement handling forks). I think I'll make a writeup of the underlying problem soon.

from poop.

matu3ba avatar matu3ba commented on August 27, 2024

I do not yet understand what time guarantees the Kernel provides regarding when reads and writes to the pseudo-file system being applied, so I asked the author of the tool with polite hints how to fix some Python stuff: SUSE/cpuset#46

I hope there are callbacks or there is anything from the Kernel, because otherwise we would need to do dirty waiting and "hope that it has applied" leaving the door open to spurious failures. Even, if tracking clone would be handled, for example via strace.

Overall overview: https://man7.org/linux/man-pages/man7/cpuset.7.html

from poop.

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.