-
Notifications
You must be signed in to change notification settings - Fork 2
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
What to do when two demos-sched instances are executed simultaneously? #31
Comments
I think that except for interference between the instances (which we cannot really do anything about), it should be quite simple to support multiple instances of demos just by suffixing the root cgroup name with an index/UUID to avoid naming collisions, no? So if it would be deemed useful, it should be just few hours of work to implement it. |
Yes, it might be useful. But don't use UUID. Using the PID of demos-sched itself should be sufficient. |
For the CPU frequency scaling I'm currently working on, I don't think we can reasonably run it in multiple instances at once, as cpufreq is global for the whole system. Only reasonable solution I can think of would be to create a lockfile or a shared mutex whenever a demos instance takes control over power management, and delete it on exit. Any other instance would first attempt to create the lock and in case it already exists, run without active power management. |
Locking is a good solution. I prefer shared mutex/semaphore over the lock file. The lock file can be stored in a network filesystem, which is potentially shared between multiple boards, which would be problematic. Shared mutex/semaphore lives always in the same kernel as the cpufreq subsystem, which is what's needed. |
Cgroup name collision will be solved by suffixing the scheduler PID to cgroup name. For power management, I originally wanted to do locking, but with #48, instances of DEmOS won't use power management by default, so I think it is (at least for now) ok to not detect other running instances using a lockfile, and instead make it the users responsibility to only enable power management if he's running a single instance. Using a lockfile may still be useful to provide better warnings and not break configured governor with multiple instances running, but I don't consider it a high priority with #48. |
Agreed. Maybe, it would make sense to print a warning, if demos is supposed to control CPU frequencies and the governor is set to userspace. In most cases, userspace governor is not the default, so if demos encounters this, it would mean that either another instance of demos or some other userspace cpufreq manager is running. |
…ple instances in parallel TODO: cleanup_crash.sh
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
Commit b0e6dc2 breaks running of demos without root. Demos then prints useless messages like this:
The name of the top-level group should stay the same. Perhaps, this issue should be solved together with unified cgroup hierarchy support (I'll create a separate issue for this). |
I know - for now, a working solution is to explicitly set the root cgroup name with |
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
…ple instances in parallel TODO: cleanup_crash.sh
…up naming scheme Sidenote: Wow, do people actually willingly write scripts in bash? Is that a case of Stockholm syndrome? closes #31
Options:
The text was updated successfully, but these errors were encountered: