View previous topic :: View next topic |
Author |
Message |
von_kossa n00b
Joined: 23 Feb 2007 Posts: 46
|
Posted: Wed Jan 08, 2025 10:26 pm Post subject: CONFIG_SCHED_AUTOGROUP question |
|
|
Hi!
Hopefully an easy one, going through my settings in my 6.8.12kernel i found that CONFIG_SCHED_AUTOGROUP was disabled, and frankly it looks like something you would like to have enabled.
Googling around a bit i found that many people mentioned that CONFIG_SCHED_ALT and CONFIG_SCHED_BMQ disabled CONFIG_SCHED_AUTOGROUP but i can´t even find ALT or BMQ, they seem to be missing.
So:
1. What happened with CONFIG_SCHED_ALT and CONFIG_SCHED_BMQ, were they removed?
2. Should CONFIG_SCHED_AUTOGROUP be enabled in 2025 or is there som caveat?
Thanks in advance |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5299 Location: Bavaria
|
|
Back to top |
|
|
tholin Apprentice
Joined: 04 Oct 2008 Posts: 207
|
Posted: Thu Jan 09, 2025 2:11 pm Post subject: Re: CONFIG_SCHED_AUTOGROUP question |
|
|
von_kossa wrote: | Hi!
2. Should CONFIG_SCHED_AUTOGROUP be enabled in 2025 or is there som caveat?
|
There are caveats to consider.
Nice values and scheduling attributes such as SCHED_IDLE may break when you use autogroups. Here is an old thread where I complained and found a solution to the problem: https://forums.gentoo.org/viewtopic-t-1060648.html
I am still using autogroups and that Cgroup workaround to this day but if you use Systemd there may be more elegant solutions available. |
|
Back to top |
|
|
von_kossa n00b
Joined: 23 Feb 2007 Posts: 46
|
Posted: Sat Jan 11, 2025 10:05 pm Post subject: |
|
|
Thank you all, i have enabled the setting.
Great link with recommended settings. |
|
Back to top |
|
|
Gentoopc Guru
Joined: 25 Dec 2017 Posts: 376
|
Posted: Sun Jan 12, 2025 8:31 am Post subject: Re: CONFIG_SCHED_AUTOGROUP question |
|
|
Guys, all this does not work well. Scheduling is very complex, it is carried out both in the Linux kernel and in the CPU. In this case, another scheduler is needed, which will regulate the work of all schedulers. Maybe it would even be possible to make an intelligent scheduler based on a cut-down GPT, the processor has an NPU, but that's not all. But if we had 6000 CUDA cores like on the GPU, or even 20000, then there would be no need for schedulers. There would be no queues. A real-time kernel on the GPU would make life on the Gentoo distribution very interesting. These are unlimited possibilities, which, unfortunately, we will not be given. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22986
|
Posted: Sun Jan 12, 2025 3:37 pm Post subject: |
|
|
Yes, if we had unlimited resources so that nothing needed to wait, we would have no need to schedule anything. We do not have unlimited resources, and on most systems, processes need to wait their turn. The kernel's scheduler tries its best to do the most good with the resources available. Part of that is allocating as little time to the scheduler itself as possible, since time spent making a decision about what to run is time not spent actually running anything the user wants done. Are you really suggesting that we use a Generative Predictive Text model, which is infamous not just for its mistakes but for its extremely high resource requirements, to make decisions that need to be made accurately, cheaply, and quickly? |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1381 Location: Richmond Hill, Canada
|
Posted: Sun Jan 12, 2025 4:04 pm Post subject: |
|
|
Conceptually I agree with Gentoopc. It would be nice that linux kernel can utilise every available resource on the box (NPU/GPU etc...). Kernel offload task on to NPU/GPU would be very nice.
However I think current technology are limited in sense that the time passing data between CPU and NPU/GPU would be too long. so doing offload don't benefit for performance wise.
I also agree with Hu's point about using Generative Prediction text model for calculate process scheduler is way too expensive (resources and times wise) so it is not worthy. |
|
Back to top |
|
|
Gentoopc Guru
Joined: 25 Dec 2017 Posts: 376
|
Posted: Mon Jan 13, 2025 3:05 am Post subject: |
|
|
Hu wrote: | and on most systems, processes need to wait their turn. as little time to the scheduler itself as possible, since time spent making a decision about what to run is time not |
Guys, this should be changed because there is a strong reason for this. Many processes simply cannot wait for their turn. In a system that will work on important objects, this is exactly the role that the Linux kernel was given, so in such a system, processes cannot be killed or not wait for their turn, because the result of these processes may be needed by other processes so that they can complete. Now I will try to say the main thing
we need to run two functions in parallel
this will be impossible on the CPU because the code is executed line by line. first foo() will be called; then foo1(); to solve this problem we need a new programming language and changes to the CPU components, but no one will do this, it is expensive and you are right when you said that you and we do not have such an opportunity. then we need to use what we have. guys, you understand, I do not suggest inventing something, I suggest using what already exists. and from what is available today, the GPU is well suited to solving this problem. there is already a programming language for the GPU, that is, there is nothing to invent. and you will be able to run functions in parallel, and therefore you will be able to do things that were previously inaccessible. for example, you will be able to get a snapshot of the entire structure at one moment. now the structure needs to be traversed recursively or in a cycle. The GPU provides a different approach. everything can change. and the main thing is that nothing needs to be invented, everything is already there.
Last edited by Gentoopc on Mon Jan 13, 2025 3:34 am; edited 2 times in total |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22986
|
Posted: Mon Jan 13, 2025 3:14 am Post subject: |
|
|
As I said in the part you did not quote, yes, it would be very convenient if everyone had such powerful systems that there was always a CPU available to run any new process that wants a timeslice, and sufficient free RAM that we never need to page out any process. Most people cannot afford the cost in money or power to maintain such a massively over-powerful system, and so get by on systems that use a scheduler that does the best it can with the resources available to it. Outside of certain safety-critical systems, requiring a process to wait its turn causes no real harm.
It's easy to find things that you wish would be different. Do you have a workable plan for how we make such a change? |
|
Back to top |
|
|
Gentoopc Guru
Joined: 25 Dec 2017 Posts: 376
|
Posted: Mon Jan 13, 2025 3:41 am Post subject: |
|
|
Hu wrote: | Do you have a workable plan for how we make such a change? |
people need to understand. people don't want to change anything. they try to adapt to the present time what was relevant 30 years ago. but it doesn't work as well today as it worked in the past. i just want to say that for the present time, we need tools that are suitable for the present time. no one even tries. they just come up with excuses that old methods are better. they come up with the idea that intel core2 is better than a 2025 GPU with 6000 cores. and they do it well. there are many people and arguments that core2 is better. |
|
Back to top |
|
|
Gentoopc Guru
Joined: 25 Dec 2017 Posts: 376
|
Posted: Mon Jan 13, 2025 3:58 am Post subject: |
|
|
Hu wrote: | Most people cannot afford the cost in money or power to maintain such a massively over-powerful system
|
you are right. But CPU consumes almost as much as GPU. Any video card with CUDA, even used, is affordable for anyone. That is why we need to move towards this. So that it is available to everyone. NPU is expensive now. GPU is everywhere and they are available on Ebay with different prices. That is where you need to look, that is where you need to move. |
|
Back to top |
|
|
|